K. Kingdom Power C.
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Today is the highly anticipated release of the new game "Kingdom Power C." Humberto is incredibly excited about this game as he has been eagerly awaiting its release for about two years.

This game is widely renowned for its extensive options that allow players to craft their own unique adventure. The game is structured as a list of levels, with some levels only accessible after completing a previous level. Upon completing a level, players are then required to choose and play one of the levels that have been unlocked as a result.

Among these levels, there are "starting levels" that can be accessed without completing any previous levels, and "ending levels" that do not lead to further progression in the game. These ending levels mark the conclusion of a game run.

Upon finishing a game run, players have the option to access "new game plus". In this mode, they can select another starting level and embark on a new playthrough. However, each successive new game plus becomes increasingly challenging. Consequently, any levels played in previous runs become inaccessible in all future new game pluses.

Humberto is determined to maximize the number of new game pluses he can experience! He seeks assistance in determining the maximum quantity of runs he can undertake.

Input

The first line of input contains three integers separated by space $$$N$$$ ($$$1 \leq N \leq 100$$$), $$$S$$$ ($$$1 \leq S \leq N$$$), and $$$E$$$ ($$$1 \leq E \leq N$$$), representing the amount of levels in the game, the amount of starting levels, and the amount of ending levels.

The next line contains $$$S$$$ integer numbers separated by a space, representing the $$$S$$$ starting levels in the game.

The next line contains $$$E$$$ integer numbers separated by a space, representing the $$$E$$$ ending levels.

The next line contains an integer number $$$M$$$ representing the number of prerequisites to access levels.

Each of the next $$$M$$$ lines contains two integer numbers $$$u$$$ and $$$v$$$ ($$$1 \leq u,v \leq N$$$), representing a prerequisite in the game, which means after completing level $$$u$$$ level $$$v$$$ can be played.

Output

Print a line with a single integer number, the maximum number of runs Humberto can play in the game.

Examples
Input
3 1 1
2
3
3
1 2
2 3
1 3
Output
1
Input
3 3 3
1 2 3
1 2 3
3
1 2
1 3
2 3
Output
3
Input
6 2 3
1 3
2 3 5
6
3 5
1 4
4 6
6 3
5 2
3 2
Output
1