Hearthstone So Easy
题号:NC229302
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Hearthstone is a turn-based card game. The game flow of each round is: Player 1 draws card  player 1 plays cards  player 2 draws card  player 2 plays cards.

We simplify the game logic as follows:
  • During each player's draw stage, the player attempts to draw a card from his or her deck.
  • During each player's playing stage, the player can choose:
  1. to increase his/her health by  k points. Note that there is no upper limit on health.
  2. to reduce the opponent's health by k points.
When there are no cards in the player's card deck, the player will enter a state of fatigue. At this time, the player will increase his/her fatigue value by one every times he/she tries to draw a card, and then deduct the amount of health by the fatigue value. The fatigue value of each player is initially 0 points.

pllj and freesin like playing hearthstone very much. In a certain game, both players have no cards in their decks, and both the fatigue points are 0 points, and the health points are both n points. When a player's health is less than or equal to 0, the player immediately loses the game.

At this time, it's pllj's turn to draw card. Both players are very smart, so they play the game optimally. Who will be the winner? Please output his name.

输入描述:

The first line contains a single integer t , which represents the number of data cases.
Each test case is one line containing two positive integers n,k   separated by one whitespace, of which meaning is described before.

输出描述:

For each case of data, output a line of string pllj or freesin to indicate the winner.
示例1

输入

复制
2
10 9
5 3

输出

复制
pllj
freesin

说明

For the first data case:
1.pllj's draw stage: pllj tries to draw cards from a empty deck. His fatigue value increases by 1 to become 1, and then pllj's health deducts by one point, leaving 9 health points.

2.pllj's playing stage: pllj causes 9 points of damage tofreesin. After this time, freesin has 1 point of life left.

3.freesin's draw stage: freesin tries to draw cards from a empty deck. His fatigue value increases by 1to become 1, and then freesin's health deducts by one point, leaving 0 points. At this time, freesin loses the game.