successive merge for generate-huffman-tree