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