Paweł i Gaweł

No attempts yetTime limit3sMemory limit128 MB

Problem

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)(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)(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)(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)(N, M).

Here the coordinate (w,c)(w, c) denotes row ww, column cc. In other words, the lower-left corner, row 1 column 1, is the starting cell.

Input

The first line contains a natural number Z (1Z101 \le Z \le 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 (1N,M10001 \le N, M \le 1000; 0KNM10 \le K \le N \cdot M - 1), as described above.

Each of the next K lines contains the coordinates of one marked cell as two space-separated natural numbers wiw_i and cic_i (1wiN1 \le w_i \le N, 1ciM1 \le c_i \le M), the row and column of that cell.

Cell (1,1)(1, 1) is never marked, and all marked cells are distinct.

Output

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.