convert to python3.x
complete naive-huffman case