P28014 [洛谷] [COCI 2023/2024 #5] Triangle
入门
题目描述

Problem Background

Translated from COCI 2023/2024 Contest #5 T5「Trokut」

Problem Description

Ivan and Lucija are on a distant journey. They know the journey will last a long time, and at some point, they will get bored. While considering what to do, Lucija came up with a game.

She drew $N$ points on a piece of paper, forming the vertices of a regular $N$-sided polygon, and labeled them sequentially from $1$ to $N$. The player whose turn it is selects two points such that the line segment connecting these two points does not intersect with any previously drawn line segments, and connects these two points. Line segments can touch at vertices. If, after a player's turn, there exist three connected line segments that form a triangle, i.e., there are three points all connected by drawn line segments, that player wins. Of course, players can connect adjacent vertices, and these segments can also be used to form triangles. The players take turns, with Lucija going first.

Both players are very skilled, and we know they will play optimally. Your task is to determine, given $N$, who will be the winner of the game. It can be proven that the game will end after a finite number of moves and will always produce a winner.

Input Format

The first line contains an integer $T\ (1\le T\le 10\ 000)$, representing the number of scenarios.

The next $T$ lines each contain an integer $N\ (3\le N\le 10^9)$, representing the number of points Lucija drew on the paper.

Output Format

Output $T$ lines, in the given order, for each scenario, output Ivan or Lucija, indicating the winner in that scenario.

Sample Input and Output

Sample Input #1

3
3
4
5

Sample Output #1

Lucija
Lucija
Ivan

Sample Input #2

3
7
8
9

Sample Output #2

Lucija
Lucija
Ivan

Notes

Sample Explanation 1

When $N = 3$, all three possible line segments must be connected, and Lucija wins.

When $N = 4$, Lucija can connect the line segment between points $1$ and $3$. We see that after any move by Ivan, Lucija can connect a triangle and win.

Subtasks

Subtask Points Constraints
1 13 $T\le 18, N\le 20$
2 36 $T\le 998, N\le 1000$
3 15 $N\le 10^5$
4 46 No additional constraints
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 3 4 5
样例输出
Lucija Lucija Ivan