Paweł and Gaweł share one house: Paweł lives on the upper floor and Gaweł on the lower floor. When they first moved in, both wanted the upper floor, so they settled the dispute with a game.
The game is played on a board of N rows and M columns, divided into unit cells. A pawn starts on the corner cell at coordinates (1,1). The two players move in turn; on each move the pawn is pushed one cell forward, either to the next column or to the next row. This repeats until the pawn reaches the cell at coordinates (N,M). Moving off the board is not allowed.
K of the cells are marked with a cross. Every time the pawn enters a marked cell, Paweł and Gaweł swap floors.
Paweł moves first, and at the start Paweł occupies the upper floor. The corner cell (1,1) is never marked. Assuming both players play optimally (each trying to end up on the upper floor), determine who lives on the upper floor when the pawn reaches (N,M).
Here the coordinate (w,c) denotes row w, column c. In other words, the lower-left corner, row 1 column 1, is the starting cell.
The first line contains a natural number Z (1≤Z≤10), the number of test sets. The sets follow in order.
The first line of each set contains three space-separated natural numbers N, M, and K (1≤N,M≤1000; 0≤K≤N⋅M−1), as described above.
Each of the next K lines contains the coordinates of one marked cell as two space-separated natural numbers wi and ci (1≤wi≤N, 1≤ci≤M), the row and column of that cell.
Cell (1,1) is never marked, and all marked cells are distinct.
For each test set, print one line: Pawel if Paweł can secure the upper floor no matter how his opponent moves, or Gawel if Gaweł can secure the upper floor no matter how his opponent moves.