Solution for 009 in Go