Solved medium problem 75.