Solved problem 191 (prize strings). Python version is too slow.