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