Exercise 3: hamming