def remove_carts(lines):
    """Remove carts from lines, replacing them with normal tracks."""
    for row_no, row in enumerate(lines):
        for col_no, square in enumerate(row):
            if square in '<>':
                lines[row_no][col_no] = '-'
            elif square in 'v^':
                lines[row_no][col_no] = '|'
    return lines