Solved 49.
Improved solution to 50.