Solve problem 9

Used a smart solution even if it is clearly overkill here