Google CodeJam solution tries