import sequtils, strutils let ns = stdin.readLine.split.map parseInt var cnts = 0.repeat 4 for n in ns: inc cnts[n] case cnts.max of 3: echo maxIndex cnts of 2: echo cnts.find 1 else: echo cnts.find 0