This is not a Huffman code/tree problem, neither I could solve it by greedy algorithm. What is it then? Anyone please give me a hit. I wish I can learn from solving this puzzle. Thx in advance.