Implement algorithm for finding words at edit distance 1.