Solution to 025 in Go