Implemented problem 99