Solved problem P50.