There is a n * n lowercase letter matrix, and I want you to modify this matrix, but I don't want to modify it too much. I want to make this matrix just contain exactly two different letters and what's more, any two lattices can't be same if they are neighboring. Now please tell me the least number of lattice need to be modify.
For each test case, print the least number of lattice need to be modify.