Hello, friends! My name is Hongz, the most famous detective in the world. Lately a murder seems to happen everywhere I go — quite the headache (heh). Anyway, today I'm on the hunt for another case. A detective has to make a living.
Years on the job let me boil the cause-and-effect between events down to something simple. For instance, if I know that whenever event A happens event B must also happen, I write that relation as A → B. Such relations can chain, like A → B → C, but they never form a cycle such as A → B → C → … → A.
One more rule. Suppose the only relations pointing at some event C are A → C and B → C. If event C actually happened, then at least one of A and B must have happened as well. In general, an event that happened must be accompanied by at least one of its causes — the events that point to it. The only exception is an event that nothing points to: it can happen on its own.
Another case today. Gathering the evidence, I've confirmed that exactly N events happened. But from just that, I can deduce that there are other events that must have happened too, under the rules. That's what a mind and experience like mine are for. Can you figure them out?
Given the N events known to have happened, find every event that must have happened under the rules above.
The first line contains three integers separated by spaces: the number of possible events D (1 ≤ D ≤ 1000), the number of relations M (1 ≤ M ≤ 100000), and the number of events known to have happened N (1 ≤ N ≤ D).
Each of the next M lines contains two integers A and B (1 ≤ A, B ≤ D), denoting the relation A → B: if event A happens, event B must also happen. The graph formed by these relations contains no cycle.
Each of the next N lines contains one integer X (1 ≤ X ≤ D), an event known to have happened.
Print the numbers of all events that must have happened under the rules, sorted in ascending order and separated by single spaces on one line.