Time limit: 1.5 seconds
Memory limit: 256 MB
After Leete's failed attempts to make Fite happy, she decides to enroll herself and Fite in the next program of the university mountain group, so that the multi-day trip will improve their relationship.

The next program of the mountain group will be held in the Baqmachgah area, whose resorts and communication routes between them are like a directed graph. In this graph:

There is at most one direct way from one resort to another. (There may be two different ways between the two resorts in opposite directions)
There is no direct way from a resort to itself.
It may exist in the distance graph.
But exactly one day before leaving for Baqmachgah, Leyte receives unpleasant news that during the days of the program, we will witness earthquakes and aftershocks in this resort area.

More specifically, it will be that for each resort, on some days there will be a vibration event at that resort. The first tremor at a fault is an earthquake, and all subsequent tremors are aftershocks. (The difference between earthquake and aftershock is explained below)
Unfortunately, if an earthquake happens in one of the resorts in this area, all the people living in this resort will rush to their homeland. And if there is an aftershock in a resort, the residents should flee to one of the resorts that have a direct exit. This escape takes exactly one day. Note that if there is an aftershock in a resort and that resort does not have a direct exit to another resort, they will have to give up their lives.

The important point is that Lite and Fite will be together in this trip and whenever they have to escape, they will choose one of the possible resorts together and go there. That is, they will remain in place until an earthquake occurs.

In the middle of the night, by connecting with Mehrsa's soul, Lite learns about the time of all earthquakes and aftershocks, and now questions keep coming to her mind that if during the day
t
t-th camp at resort no
x
x, is it possible to survive until the end of the camp or not. Naturally, you should help him in solving this problem.

input
The first line of input contains three natural numbers
n
n and
m
m and
q
q are the number of rest stops, the number of one-way paths between them, and the number of questions of the Liete mind, respectively.
1
≤
n
,
m
,
q
≤
400

000
1≤n,m,q≤400 000
in
i
The i-th line of
n
n the next line of information about the vibrations of the resort no
i
i comes, so that at the beginning the number
k
k stands for the number of city vibrations
i
i is followed by
k
k number like
t
t are in ascending order, indicating the days in the city
i
i Vibration has occurred.

The first tremor of any city is an earthquake, and the rest of the tremors in that city are aftershocks.
All vibrations are guaranteed to have different timings. That is, vibration does not happen in two resting places at the same time.
0
≤
k
≤
400

000
0≤k≤400 000
1
≤
t
≤
1
0
9
1≤t≤10
9

It is also guaranteed that the total number of vibrations is less equal
400

000
It is 400,000.
in each of
m
m line after two numbers
v
v and
u
u is mentioned, indicating the presence of a one-way route from resort no
v
v to resort no
u
u is
1
≤
v
,
u
≤
n
1≤v,u≤n
in each of
q
q Next line two numbers in order
x
x and
t
t is said to indicate one of the questions on the mind of the litte. (Do if they are in the day
t
t at resort no
x
x will die or live)
1
≤
t
≤
1
0
9
1≤t≤10
9

1
≤
x
≤
n
1≤x≤n

output
For each Lite Mind question, print the word Alive if the answer to the question is that they will survive, and print the word Dead otherwise.

Example
Sample entry 1
4 4 4
2 2 4
3 1 5 7
1 6
1 10
1 2
2 3
3 1
2 4
2 5
2 6
1 4
1 5
Plain text
Sample output 1
Dead
Alive
Dead
Alive
Plain text
You can see the resort map related to the sample entry in the figure below.

Sample graph

If they are at resort 2 at time 5 (first question) they will definitely die because they will die whether they go to resort 3 (at time 6) or resort 4 (at time 10).

If they are in resort 2 at time 6 (second question) they can have an aftershock at time 7 and they survive by going to resort 3. Because they reach rest area 3 at time 8 and there is no more earthquake.

If they are in resort 1 at time 4 (third question), they have to go to resort 2 and die as in the first question.

If they are at rest area 1 at time 5 (question 4), there will be no earthquake and they will survive there.          write in java17