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