P3150 pb's Game (1)

Background

One day pb and zs played a game. You need to help zs determine the winner of each round.

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 $N$ 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 $N$, the number of test cases. Then follow $N$ lines. Each line contains an integer $M$, the initial number for that game.

Output Format

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

Explanation/Hint

Constraints: For all testdata, $1 < N < 50$, $1 \le M \le 10^9$. Translated by ChatGPT 5