I need to compress a text using huffman coding. Before doing that I need to pre process the input text using Move to front(MTF) algorithm.