Solved medium problem 63 (better this time).