Codeforces Round 110 (Div. 1)
B
Suspects
Codeforces
1600
原题
← AC →
翻译中…

As Sherlock Holmes was investigating a crime, he identified $*n*$ suspects. He knows for sure that exactly one of them committed the crime. To find out which one did it, the detective lines up the suspects and numbered them from $1$ to $*n*$. After that, he asked each one: "Which one committed the crime?". Suspect number $*i*$ answered either "The crime was committed by suspect number $*a*_{*i*}$", or "Suspect number $*a*_{*i*}$ didn't commit the crime". Also, the suspect could say so about himself ($*a*_{*i*} = *i*$).

翻译中…

Sherlock Holmes understood for sure that exactly $*m*$ answers were the truth and all other answers were a lie. Now help him understand this: which suspect lied and which one told the truth?

翻译中…

Input

翻译中…

The first line contains two integers $*n*$ and $*m*$ ($1 ≤ *n* ≤ 10^{5}, 0 ≤ *m* ≤ *n*$) — the total number of suspects and the number of suspects who told the truth. Next $*n*$ lines contain the suspects' answers. The $*i*$-th line contains either "+$*a*_{*i*}$" (without the quotes), if the suspect number $*i*$ says that the crime was committed by suspect number $*a*_{*i*}$, or "-$*a*_{*i*}$" (without the quotes), if the suspect number $*i*$ says that the suspect number $*a*_{*i*}$ didn't commit the crime ($*a*_{*i*}$ is an integer, $1 ≤ *a*_{*i*} ≤ *n*$).

翻译中…

It is guaranteed that at least one suspect exists, such that if he committed the crime, then exactly $*m*$ people told the truth.

翻译中…

Output

翻译中…

Print $*n*$ lines. Line number $*i*$ should contain "Truth" if suspect number $*i*$ has told the truth for sure. Print "Lie" if the suspect number $*i*$ lied for sure and print "Not defined" if he could lie and could tell the truth, too, depending on who committed the crime.

翻译中…

Note

翻译中…

The first sample has the single person and he confesses to the crime, and Sherlock Holmes knows that one person is telling the truth. That means that this person is telling the truth.

翻译中…

In the second sample there are three suspects and each one denies his guilt. Sherlock Holmes knows that only two of them are telling the truth. Any one of them can be the criminal, so we don't know for any of them, whether this person is telling the truth or not.

翻译中…

In the third sample the second and the fourth suspect defend the first and the third one. But only one is telling the truth, thus, the first or the third one is the criminal. Both of them can be criminals, so the second and the fourth one can either be lying or telling the truth. The first and the third one are lying for sure as they are blaming the second and the fourth one.

翻译中…

样例

Input #1
1 1
+1
Output #1
Truth
InputCopy OutputCopy
Input #2
3 2
-1
-2
-3
Output #2
Not defined
Not defined
Not defined
InputCopy OutputCopy
Input #3
4 1
+2
-3
+4
-1
Output #3
Lie
Not defined
Lie
Not defined
InputCopy OutputCopy
题目信息
题号
156B
时间限制
2 s
内存限制
256 MB
标签
构造
数据结构
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。