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

NEERC 2009, Eastern subregional contest

About     Problems     Submit solution     Judge status     Standings
Contest is over

D. Mnemonics and Palindromes 2

Time limit: 3.0 second
Memory limit: 64 MB
At last, Vasechkin had graduated from the university and it was the time to choose his future. Vasechkin recalled all the inadequate outcomes, unsolvable problems, and incomprehensible problem statements that he encountered at programming contests, so he decided to join a program committee. Soon he was asked to prepare a problem for the forthcoming student contest, which would be dedicated to binary alphabets. The problem had to fall under that topic. However, Vasechkin wanted the participants to remember his problem for a long time, so he decided to give the problem an unusual and complicated name.
Vasechkin decided that the name had to consist of the letters “a” and “b” only and contain exactly n letters. In addition, the name had to be as complex as possible. The complexity of a name is defined as the minimal number of palindromes into which it can be decomposed. Help Vasechkin to invent the most complex name for his problem.


The only line contains an integer n (1 ≤ n ≤ 1000).


Output the required name of length n consisting of the letters “a” and “b” only. If there are several such names, output any of them.


Problem Author: Igor Chevdar
Problem Source: NEERC 2009, Eastern subregional contest
To submit the solution for this problem go to the Problem set: 1714. Mnemonics and Palindromes 2