import strutils, sequtils var n = stdin.readLine.parseInt mat = newSeqWith(n, newSeqWith(n, "")) cnt = newSeqWith(n, 0) for i in 0..