In the faraway city of Xanadu, a flu epidemic has broken out, caused by a strain known as hairy flu. There are
people living in the city, each resident having a unique personal ID number from the range of
to
, inclusive. Infection with this strain lasts exactly one day, and a person can catch it multiple times per season (since it mutates too quickly for lasting immunity).
On the first day of the epidemic, the flu was brought from another faraway country by a group of residents nicknamed "init-patients", whose ID numbers are known. The flu's spread is based on them. Each following day, a resident with ID number
will catch the flu if there exists a resident with ID
who was infected the previous day, as well as an init-patient with ID
, such that:

The numbers
and
need not be distinct. For example, consider a case where there are
people in the town, and the init-patients are
and
. On the first day, the init-patients are infected by definition. On the second day, the residents infected are
,
, and
. On the third day, one of the infected patients is
, since
.
Who will catch the flu on the
day?
Input Specification
The first line of input contains three positive integers,
,
, and
.
The second line of input contains
space-separated nonnegative integers, the personal ID numbers of residents who were infected on the first day (the init-patients). These numbers are unique, increasing, and do not exceed
.
Output Specification
The first and only line of output must contain the personal ID numbers of residents infected with flu on the
day, given space-separated and in increasing order.
Sample Input 1
Copy
1 100 3
1 2 3
Sample Output 1
Copy
1 2 3
Sample Input 2
Copy
2 100 3
1 2 3
Sample Output 2
Copy
1 2 3 4 6 9
Sample Input 3
Copy
10 101 2
5 50
Sample Output 3
Copy
36 44 57 65
Comments