def output_labelled_ranked_list(sysdoclab):
    """
    Output a ranked list of documents with a relevance level.

    Args:
        sysdoclab: a ranked list of tuples of a document ID and a relevance level.
    """
    for did, grade in sysdoclab:
        print(did + (' L' + str(grade) if grade is not None else ''))
