n=gets.to_i if n==1 puts 'n' exit end a=(0...26).map{|i|('a'.ord+i).chr*20} c='' i=rand(26) s=a[i] while s[19]=='n' i=random(26) s=a[i] end c=s[19] puts s a[i].next! (n-2).times{ i=c.ord-'a'.ord c=a[i][19] while c=='n' a[i].next! c=a[i][19] end puts a[i] a[i].next! } i=c.ord-'a'.ord c=a[i][19] while c!='n' a[i].next! c=a[i][19] end puts a[i]