#P3150. pb的游戏(1)

pb的游戏(1)

Description

The rules are as follows:

  • The first player splits the given number into the sum of two positive integers. Then the second player chooses one of the two numbers produced in the previous move and splits it again. The two players take turns. When a player cannot make a move, the other player wins.

Now you need to determine the winner for NN games.

We assume both players play optimally. In each game, pb moves first. If pb has a winning strategy, output pb wins; otherwise output zs wins.

Input Format

The first line contains an integer NN, the number of test cases.

Then follow NN lines. Each line contains an integer MM, the initial number for that game.

Output Format

Output NN lines. Each line contains a string indicating the game result.

5
1
3
7
20
5
zs wins
zs wins
zs wins
pb wins
zs wins

Hint

Constraints: For all testdata, 1<N<501 < N < 50, 1M1091 \le M \le 10^9.

Translated by ChatGPT 5