def remove_adjacent_duplicates(name):
    """ Remove adjacent duplicate codes."""
    j = 1
    while j < len(name):
        if name[j] == name[j - 1]:
            name = name[:j] + name[j + 1:]
        else:
            j += 1
    return name