ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests

Ural Championship 2011

About     Problems     Submit solution     Judge status     Standings
Contest is over

C. Arirang Show

Time limit: 0.5 second
Memory limit: 64 MB
The Arirang Show is a magnificent performance given annually in the North Korean capital Pyongyang. The show is very popular, and the cost of tickets can be as high as 300 dollars.
Tens of thousands of dancers take part in the performance each year. In one of the episodes of the 2011 show n dancers line up and then divide into d groups (d is a proper divisor of n). In each of the groups the dancers make a circle holding each others' hands and circle around. There are dancers with numbers 1, d + 1, 2d + 1, …, nd + 1 in the first circle, dancers with numbers 2, d + 2, 2d + 2, …, nd + 2 in the second circle, and so on. In the last circle there are dancers with numbers d, 2d, …, n.
Organizers of the show ask you to distribute the colors of the dancers' shirts so that in each circle any two neighbors wear shirts of different colors. You have been told the number n, but when you asked about the value of d the organizers said: “You are not allowed to know this number.”
The organizer can make shirts of only 26 different colors. Can you satisfy their request regardless of the choice of the number d?


The only line contains the integer n (2 ≤ n ≤ 300000).


Output a line of length n consisting of lowercase English letters. The i-th symbol should denote the color of the i-th dancer's shirt (the colors are coded by letters from “a” to “z”). If there are several correct answers, output any of them. If it is impossible to arrange the colors as required, output “Impossible”.


Problem Author: Viktor Kamashev (prepared by Daniil Ayzenshtein)
Problem Source: Ural Championship 2011
To submit the solution for this problem go to the Problem set: 1832. Arirang Show