solve hamming