Solved medium problem 69.