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