#include <bits/stdc++.h>
using namespace std;
class FindStringEasy
{
public :
string ans = "" ;
int a ;
int cnt( string s)
{
int n = s.size ( ) ;
int cnt = 0 ;
for ( int i = 0 ; i < n ; ++ i)
{
string s2 = "" ;
for ( int j = i ; j < n ; ++ j)
{
s2 + = s[ j] ;
string s3 = s2 ;
reverse( s3.begin ( ) , s3.end ( ) ) ;
if ( s2 == s3)
cnt++ ;
}
}
return cnt ;
}
void solve( string s)
{
if ( ans.size ( ) > 0 )
return ;
int x = cnt( s) ;
if ( x == a)
{
ans = s ;
return ;
}
if ( x > a)
return ;
solve( s + 'a' ) ;
solve( s + 'b' ) ;
}
string withPalindromicSubstrings( int n)
{
a = n ;
solve( "" ) ;
return ans ;
}
} ;
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgRmluZFN0cmluZ0Vhc3kKewpwdWJsaWM6CiAgICBzdHJpbmcgYW5zID0gIiIgOwogICAgaW50IGEgOwogICAgaW50IGNudChzdHJpbmcgcykKICAgIHsKICAgICAgICBpbnQgbiA9IHMuc2l6ZSgpIDsKICAgICAgICBpbnQgY250ID0gMCA7CiAgICAgICAgZm9yKGludCBpID0gMCA7IGkgPCBuIDsgKytpKQogICAgICAgIHsKICAgICAgICAgICAgc3RyaW5nIHMyID0gIiIgOwogICAgICAgICAgICBmb3IoaW50IGogPSBpIDsgaiA8IG4gOyArK2opCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHMyICs9IHNbal0gOwogICAgICAgICAgICAgICAgc3RyaW5nIHMzID0gczIgOwogICAgICAgICAgICAgICAgcmV2ZXJzZShzMy5iZWdpbigpICwgczMuZW5kKCkpOwogICAgICAgICAgICAgICAgaWYoczIgPT0gczMpCiAgICAgICAgICAgICAgICAgICAgY250Kys7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGNudCA7CiAgICB9CiAgICB2b2lkIHNvbHZlKHN0cmluZyBzKQogICAgewogICAgICAgIGlmKGFucy5zaXplKCkgPiAwKQogICAgICAgICAgICByZXR1cm4gOwogICAgICAgIGludCB4ID0gY250KHMpIDsKICAgICAgICBpZih4ID09IGEpCiAgICAgICAgewogICAgICAgICAgICBhbnMgPSBzIDsKICAgICAgICAgICAgcmV0dXJuIDsKICAgICAgICB9CiAgICAgICAgaWYoeCA+IGEpCiAgICAgICAgICAgIHJldHVybiA7CiAgICAgICAgc29sdmUocyArICdhJyk7CiAgICAgICAgc29sdmUocyArICdiJyk7CiAgICB9CiAgICBzdHJpbmcgd2l0aFBhbGluZHJvbWljU3Vic3RyaW5ncyhpbnQgbikKICAgIHsKICAgICAgICBhID0gbiA7CiAgICAgICAgc29sdmUoIiIpOwogICAgICAgIHJldHVybiBhbnMgOwogICAgfQp9Ow==