He is too selfish, so for a given n he wants to obtain a string of n characters, each of which is either 'a', 'b' or 'c', with no palindromes of length 3 appearing in the string as a substring. For example, the strings "abc" and "abca" suit him, while the string "aba" doesn't. He also want the number of letters 'c' in his string to be as little as possible.
Input The first line contains single integer n ( 1 ≤ n ≤ 2·105 ) — the length of the string. OutputPrint the string that satisfies all the constraints.
If there are multiple answers, print any of them.
Examples input 2 output aa input 3 outputbba
只要没有三个是回文的 直接输出aabbaabbaabb这个形式的 这个任意三个数没有回文 而且没有c
#include <stdio.h> #include <string.h> #include <bits/stdc++.h> #define mod 1000000007 #define ll long long using namespace std; int main() { int n; cin>>n; int k=1; for(int i=0;i<n;i++){ if(i%2==0)k*=-1; if(k==1)printf("%c",'b'); else printf("%c",'a'); } return 0; }