import sequtils,strutils,algorithm,math,sugar,macros,strformat import sets,tables,intsets,queues,heapqueue,bitops template get*():string = stdin.readLine().strip() macro unpack*(arr: auto,cnt: static[int]): auto = let t = genSym(); result = quote do:(let `t` = `arr`;()) for i in 0..( if x[1] != y[1]: y[1] - x[1] elif x[0] > y[0]: 1 else: -1 )) for s in S[0..