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