Solution to 023 in Go