solve hamming distance 2