n=input() r=range(n) for i in r:print'a%*s'%(n,''.join(chr(97+j)for j in r)[:i+1])
26
a a a ab a abc a abcd a abcde a abcdef a abcdefg a abcdefgh a abcdefghi a abcdefghij a abcdefghijk a abcdefghijkl a abcdefghijklm a abcdefghijklmn a abcdefghijklmno a abcdefghijklmnop a abcdefghijklmnopq a abcdefghijklmnopqr a abcdefghijklmnopqrs a abcdefghijklmnopqrst a abcdefghijklmnopqrstu a abcdefghijklmnopqrstuv a abcdefghijklmnopqrstuvw a abcdefghijklmnopqrstuvwx a abcdefghijklmnopqrstuvwxy aabcdefghijklmnopqrstuvwxyz