OCaml solution to Problem L (Labyrinth) from IPSC 2013