An attempt to solve the Google Code Jam in Haskell