import Control.Applicative import Control.Monad x = [ "religious", "irreligious" ] y = [ "gnostic", "agnostic" ] z = [ "theist", "atheist" ] validPositions = (\a b c -> show a + " " + show b + " " + show c) <$> x <*> y <*> z main = validPositions map_ putStrLn