Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

Wow! Such String!

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 513    Accepted Submission(s): 51
Special Judge


Problem Description
Recently, doge starts to get interested in a strange problem: whether there exists a string A following all the rules below:

1.The length of the string A is N .
2.The string A contains only lowercase English alphabet letters.
3.Each substring of A with length equal to or larger than 4 can appear in the string exactly once.

Doge cannot solve the problem, so he turns to his brother Yuege for help. However, Yuege is busy setting problems. Would you please help doge solve this problem?
 

Input
There are several test cases, please process till EOF.
For each test case, there will be one line containing one integer N (1 ˇÜ N ˇÜ 500000).
Sum of all N will not exceed 5000000.
 

Output
For each case, please output one line consisting a valid string if such a string exists, or ˇ°Impossibleˇ± (without quotes) otherwise. You can output any string if there are multiple valid ones.
 

Sample Input
5 3 11 10 6 17 8
 

Sample Output
pwned wow suchproblem manystring soeasy muchlinearalgebra abcdabch
 

Statistic | Submit | Clarifications | Back