Appearing Numbers
Time limit2sMemory limit1024 MB
Given a sequence of N digits from 0 to 9, the task is to print each distinct digit that appears, in increasing order.
Problem
A sequence of length is given, where each element is an integer from to inclusive. Print every integer that appears at least once in , in increasing order.
Input
The input is given in the following format.
N
A1 A2 … AN
Output
Print every integer that appears at least once in , in increasing order, one per line. Print nothing other than the result. Do not print prompts or other text.
Constraints
- .
- ().
- All input values are integers.