from typing import List


def iob2_iob1(tags: list) -> List[str]:
    """
    Tags in IOB2 format are converted to IOB1.
    """
    for i, tag in enumerate(tags):
        if tag == "O":
            continue
        if i == 0 or tags[i - 1] == "O":
            tags[i] = "I" + tag[1:]
        elif tags[i - 1][1:] == tag[1:]:
            continue
        else:
            tags[i] = "I" + tag[1:]
    return tags