Hungar has a magic board,it's size is n*n,every lattice can be marked by ‘#’ or ‘*’.The former means hungar hates it,and the latter means he loves it.But he can choose one lattice and change it ,which means if the lattice is ‘#’,it will be ‘*’ and vice versa.What’s more, if you choose one lattice,It’s adjacent lattice will also be changed(if any).
We will give you an untreated board(Initialization),now hungar wants to know whether
he can make the board all his love. you are a good Acmer.Can you help him?
if he can’t make it ,output “inf”(without the quotes)
or you should output the minimum number of operations by hunger.