Solution to level 62 in Untrusted: http://alex.nisnevich.com/untrusted/