import strutils, sequtils let n = parseInt(readLine(stdin)) var exists: array[10, bool] for i in 0..9: exists[i] = true for i in 0..