Solutions written in Python, Ruby, Haskell.