import sequtils,strutils,algorithm type bound = tuple[a : int,b : int,value : int] var N = stdin.readline.parseInt A = newSeqWith(N,newSeq[int](0)) cnt : int T : seq[int] unit : bound flag = newSeqWith(N,false) Units = newSeq[bound](0) for n in 0..