Problem 1002: Phone numbers
This solution is slow and needs to some refactor.