def get_decoded_str(root, encoded_string):
    """Decode encoded string and return it"""
    decoded_data = []
    current = root
    for code in encoded_string:
        if code == '0':
            current = current.left
        if code == '1':
            current = current.right
        if current.is_leaf():
            char = current.char
            decoded_data.append(char)
            current = root
    return ''.join(decoded_data)
