Solution to the Silent Hill 3 hospital riddle (2nd floor) in Haskell