import strutils, sequtils, algorithm discard stdin.readLine let c = stdin.readLine.split.map(parseInt) var v = newSeq[int]() for idx, ci in c: v.add(repeat(idx + 1, ci)) echo v.sorted(cmp, Descending).join