Sociology#5445

Sociology

2 seconds
256 megabytes
Very hard

Vasya works for the Research Institute of Sociological Tasks (RISK). He is studying relationships between freelance software engineers and their managers. Vasya considers several jobs assigned to programmers. Each job is performed by one engineer and managed by one manager.

Vasya calls a subset of managers excessive if the set of engineers who have at least one job with a manager from has cardinality less than . His hypothesis is that a system without excessive subsets of managers is more stable and applies less pressure to the workers.

Your task is to find an excessive subset of managers or to report that none exists.

Input

The input consists of no more than test cases. The first line of each test case contains two integers N_e and N_m—the number of engineers and managers, respectively (1 \le N_e, N_m \le 10^4). The next line contains a single integer N_j—the number of jobs (1 \le N_j \le 10^5). Then N_j lines follow, each containing two integers e_i and m_i—the numbers of the engineer and the manager assigned to the -th job.

Output

For each test case, output either an excessive subset of managers or state that it does not exist. Follow the output format shown in the sample as closely as possible.

Examples

Example 1

Loading
Loading