Given an integer , construct a string with only the characters a
and b
that has exactly substrings that contain the character a
.
If there are multiple solutions, you may print any.
Input Specification
The first and only line will contain an integer .
Output Specification
You are to print one line, containing a string that satisfies the conditions outlined in the problem statement.
Note
It may be useful to know that the number of substrings of a string of length is .
Subtasks
Subtask 1 (80%)
Subtask 2 (10%)
Subtask 3 (10%)
No further constraints.
Sample Input 1
4
Sample Output 1
bab
Explanation for Sample 1
bab
contains 6 substrings: b
,a
,b
,ba
,ab
, and bab
. 4 of these substrings contain the character a
.
Sample Input 2
11
Sample Output 2
bbaba
Explanation for Sample 2
bbaba
contains 15 substrings: b
, b
, a
, b
, a
, bb
, ba
, ab
, ba
, bba
, bab
, aba
, bbab
, baba
, bbaba
. 11 of these substrings contain the character a
.
Comments