Refactor Problem 37 Setup
Solve Problem 37