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