import strutils, sequtils, tables var n = stdin.readLine.parseInt a = stdin.readLine.split.map(parseInt) dic = initOrderedTable[int, seq[int]]() for i in 0..