main
= mapM_ print $ combinations
[["England"],["London","Liverpool"],["DG300","SS500"]]
combinations [] = [[]]
combinations (x:xs) = do
ys <- combinations xs
y <- x
bWFpbiA9IG1hcE1fIHByaW50ICQgY29tYmluYXRpb25zIFtbIkVuZ2xhbmQiXSxbIkxvbmRvbiIsIkxpdmVycG9vbCJdLFsiREczMDAiLCJTUzUwMCJdXQoKY29tYmluYXRpb25zIDo6IFtbU3RyaW5nXV0gLT4gW1tTdHJpbmddXQpjb21iaW5hdGlvbnMgW10gICAgID0gW1tdXQpjb21iaW5hdGlvbnMgKHg6eHMpID0gZG8KICAgIHlzIDwtIGNvbWJpbmF0aW9ucyB4cwogICAgeSA8LSB4CiAgICByZXR1cm4gKHk6eXMp
["England","London","DG300"]
["England","Liverpool","DG300"]
["England","London","SS500"]
["England","Liverpool","SS500"]