def back_to_tag(tag, attrs):
    """
    recover tag from tag name and attributes.
    """
    sol = '<' + tag
    for (prop, val) in attrs:
        sol += ' ' + prop + '="' + val + '"'
    sol += '>'
    return sol