Solution to 012 in Go