import algorithm, sequtils, strutils let n: int = stdin.readline.parseInt a: seq[seq[int]] = mapIt(0..