func main() var n: int :: cui@inputInt() var dic: dict :: #dict for i(0, n - 1) var a: int :: cui@inputInt() var cnt: int :: 0 if(dic.exist(a)) do cnt :: dic.get(a, &) end if do dic.add(a, cnt + 1) end for var ans: lib@Int :: #lib@Int do dic.forEach(f, ans) do cui@print("\{ans.value}\n") func f(key: int, value: int, data: kuin@Class): bool if(value = 1) do(data $ lib@Int).value :+ 1 end if ret true end func end func