Generalize Huffman to ternary codes (alphabet size 3)

Analyze the generalize huffman to ternary codes (alphabet size 3).

Examples
Input: "test_input_1"
Output: "output_1"
Hints

Generalize Huffman to ternary codes (alphabet size 3)

Analyze the generalize huffman to ternary codes (alphabet size 3).