data ABBA=A|AA|B|BB|AAB|BAAB deriving Show main=mapM(putStrLn.show)$[A,AA,B,B,BB,A,AAB,BAAB,A]