#!/usr/bin/python
s = ['a','a','a','a','a','a','a','a','a']
print s
def plus(s):
i = -1
cf = 1
while cf == 1:
if (s[i] == 'a'):
cf = 0
s[i] = 'b'
elif s[i] == 'b':
cf = 0
s[i] = 'c'
elif (s[i] == 'c'):
cf = 1
s[i] = 'a'
i -= 1
while s != ['c','c','c','c','c','c','c','c','c']:
plus(s)
print s