def huffman_decoding(encoded_str, root):
    """Huffman decoding algorithm
     Args:
         sentence: encoded string
         root: root Node for Huffman Binary Tree
     Returns:
         decode_str: string decoded from the sequence
    """
    decoded = []
    node = root

    for e in encoded_str:
        if e == '1':
            node = node.get_right_child()
        elif e == '0':
            node = node.get_left_child()
        if node.is_leaf():
            decoded.append(node.get_letter())
            node = root

    decoded = ''.join([e for e in decoded])
    return decoded