Solution for the problem #82.