Another implementation for problem 73.

Maybe second solution a little bit longer, but it must be easier to
understand and modify.