#include<bits/stdc++.h>
using namespace std;

int main(){
	int a, i;
	char c;
	string s, ans="", cnt ="";
	//cin >> s;
	stack <char > S;
	for(i=0;i<50;i++){
		a = rand()%3;
		c = 'a'+a;
		cnt += c;
		if(S.empty()){
			S.push(c);
		}else{
			if(S.top()==c){
				while(S.top()==c and !S.empty()){
					S.pop();
					a = c-'a';
					a += 1;
					a %= 3;
					c = a+'a';
				}
				S.push(c);				
			}else{
				S.push(c);
			}
		}
	}
	while(!S.empty()){
		ans = S.top()+ans;
		S.pop();
	}
	cout<<cnt<<"\n";
	cout<<ans<<"\n";
}
