Solution to CodeJam 2009 in Go