This function realizes the hamming code of a 7 variables input. We use the specification from Maslovs et. al benchmark page. The function was originally proposed by Patel and Markov.