The product of graphs
Given a directed acyclic graph. Standard game on a graph is as follows: initially at one of the vertices of the graph (we call it the starting point) should feature. Two players take turns moving her in the ribs. Plays one who can not make a move.
In game theory is often considered more complex games. For example, the direct product of two games on graphs. The direct product of games - it's the next game: at the beginning of each graph is the starting position on the chip. Over the course of the player moves along the edges of both pieces (each piece moves in its own box). Plays one who can not make a move. That is the one who can not make a move at least one game.
Your task - to determine who will benefit from the proper game.
Input
The first line will be given numbers N_1 and M_1 - the number of vertices and edges in the first column (1 ≤ N_1, M_1 ≤ 100000). In the following lines M_1 contains two numbers x and y (1 ≤ x, y ≤ N_1).
The following lines set M_2+1 second graph in the same format.
Ends the input file list of pairs of initial vertices for which you want to solve the problem. On the first line number is set to T (1 ≤ T ≤ 100000) - initial number of pairs of vertices. In the following T lines are pairs of vertices v_1 and v_2 (1 ≤ v_1 ≤ N_1, 1 ≤ v_2 ≤ N_2).
Output
On each of the pairs of T output the line of initial vertices "first", if correct wins first game, and "second", if the second one.