twisted study finger tutorial
2013 Problem D. Treasure
inputs