import sequtils,strutils var N = stdin.readline.parseInt S = newSeqWith(N, newSeq[string](N)) ans,cnt : int for n in 0..