import sequtils, strutils let nx = stdin.readLine.split.map parseInt n = nx[0] x = nx[1] var list = 0.repeat x.succ for i in 1..n: let ab = stdin.readLine.split.map parseInt a = ab[0] b = ab[1] for j in 0.. 0: list[pa] = max(list[pa], c) echo list[1..^1].join " "