Problem 1002: Phone numbers
Possibly faster solution, but still Time Limit