# L-9 MCS 275 Mon 4 Feb 2008 : enumwords
#
# enumerates all combinations of letters

def enumwords(k,L,s):
   """
   starting with the k-th list in L,
   adds letters to the current string s
   """
   if k >= len(L):
      print s
   else:
      for i in range(0,len(L[k])):
         enumwords(k+1,L,s+L[k][i])

def main():
   """
   enumerates letter combinations
   """
   S = ['c','s','v']
   V = ['a','e','i','o','u']
   E = ['d','t','w']
   L = [S,V,E]
   enumwords(0,L,"")

main()
