Solution to the telephone words problem.