Time

18:04:18
22 May 2012
Version for print

Alphabetic graffiti

prb1124   Graffiti - a form of modern barbaric painting. Vasya, as should be worthy descendants of the barbarians, also decided to address this very promising in terms of its business and to perpetuate their stay in school graffiti graffiti.

   Since, by drawing from Vasey had a solid "two", and he was still learning English after studying quite hard which gave him the pronunciation of the third letter of the alphabet, he decided to immortalize their meal in a study of this once difficult for him the object map of each stage connected with the study of the next letter corresponding to the inscription on a school wall.

   Artistic research Vasey after studying the 3-th and 7-th letters shown in the example output.

   Since every step to make the correct label Basil was getting harder and harder to write a program that will help him make a cheat sheet for the application of another pattern.


Specifications

   Input

   The only number N (3N26) - number of studied English letters.

   Output

   The inscription on the wall, made after examining Vasya N letters of the alphabet.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 5
Complexity: 6% 263/280
Source: Stage II All-Ukrainian Olympiad 2010-2011 Berdichev
Classes: Algorithms on strings, Simple mathematics, Beginners

Example

Example input

Sample 1
3

Sample 2
7

Example output

Sample 1
a..a
a.ab
aabc

Sample 2
a......a
a.....ab
a....abc
a...abcd
a..abcde
a.abcdef
aabcdefg

Example tip: Points in the sample marked spaces for the convenience of calculation, as with mathematics, respectively, at Vasey also had a problem ... :)



← Lucky Number Problems The Angle →