General Iroh and Commandant Bumi are heading to the Republic City to stop a rebellion. But it's quite a long travel, so in the meantime they have started discussing about possible attacking plans. Right now, they're arguing about best ways for moving soldiers during the battle. Tired of not getting a final and concise strategy, Iroh proposed a particularly original idea.
Bumi, look at this map: here we have all possible locations in the battle field soldiers can occupy. I know a game which can give us some ideas.
A game? How will a game help us here?
It's pretty simple, we know which location is connected to each one, and also, that all those paths between locations are one-way (it's too dangerous to have two ways paths), so we place some soldiers at random initial locations, take turns, and in each turn, we try to make a valid move with one soldier from one location to another. Eventually, we won't be able to move any man so, the first one which is not able to perform any valid move, loses. One important thing is, at some moment, we may have some men at the same field location.
Are you sure we are gonna end this? We have so many locations and paths... don't know, soldiers could be moving in circles for ever.
Take it easy man, those paths were built by the best architects I've ever known, so there is no way that could happen.
Well, I still don't get how does this help us.
Me neither, but greatest generals from the Earth Kingdom created their strategies from this game, so, who knows?
Ok, I'm in. Who plays first?
You go first my friend. Just make sure you always do your best, because I will show no mercy to you :).
First line in the input contains two integers N and M, describing the number of locations and paths between them, respectively. M lines follow, each one with two integers u and v, denoting a one-way path from u to v.
Then comes a line with a single integer Q, denoting how many times Bumi and Iroh played the game over the given field. Q queries follow each one with two lines, first one with a single integer K, the number of soldiers in the field; and second one with K integers b_i separated by space, each one denoting the initial location of some soldier.
1 < N <= 105
1 <= M <= 106
1 <= u, v, b_i <= N
1 <= K <= 102
1 <= Q <= 105
Output Q lines, each one saying Bumi if Bumi should be the winner of the corresponding game or Iroh otherwise.
Remember that, being both top strategy masters, they will always perform the best possible move each turn.