sort3 hamming