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