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