def manhattanDistance(current: list, target: list):
    """
    Calculates the Manhattan distance between two 3x3 lists
    """
    count = 0
    curr_1d = []
    tgt_1d = []
    for i in range(3):
        for j in range(3):
            curr_1d.append(current[i][j])
            tgt_1d.append(target[i][j])
    for x in tgt_1d:
        count += abs(tgt_1d.index(x) - curr_1d.index(x))
    return count