n, l, r = list(map(int, input().rstrip().split()))
a = list(map(int, input().rstrip().split()))
b = list(map(int, input().rstrip().split()))
a1=a2=a3=b1=b2=b3=None
if l==1:
a2=a[0:r]
a3=a[r::]
b2=b[0:r]
b3=b[r::]
elif l==2:
a1=a[0]
a2=a[1:r]
a3=a[r::]
b1=b[0]
b2=b[1:r]
b3=b[r::]
else:
a1=a[0:l-1]
a2=a[l-1:r]
a3=a[r::]
b1=b[0:l-1]
b2=b[l-1:r]
b3=b[r::]
a2.sort()
b2.sort()
print("TRUTH" if a1==b1 and a2==b2 and a3==b3 else "LIE")
#include<iostream>
using namespace std;
#include<bits/stdc++.h>
#define ll long long int
/*
TARGET : 3 questions in Div 2, in (1/2) hr.
*/
int main(){
ll n;
cin>>n;
ll a,b;
cin>>a>>b;
a--;
b--;
vector<ll>v(n);
for(ll i =0;i<n;i++){
cin>>v[i];
}
vector<ll>vk(n);
for(ll i =0;i<n;i++){
cin>>vk[i];
}
bool ok = true;
for(ll i = 0;i<a;i++){
if(v[i]!=vk[i]){
ok = false;
}
}
for(ll j = b+1;j<n;j++){
if(v[j]!=vk[j]){
ok = false;
}
}
if(ok==false){
cout<<"LIE"<<endl;
}
else{
map<ll,ll>mp;
map<ll,ll>mp1;
for(ll i =a;i<=b;i++){
mp[v[i]]++;
mp1[vk[i]]++;
}
for(auto i:mp){
if(i.second!=mp1[i.first]){
ok = false;
}
}
for(auto i:mp1){
if(i.second!=mp[i.first]){
ok = false;
}
}
if(ok){
cout<<"TRUTH"<<endl;
}
else{
cout<<"LIE"<<endl;
}
}
}
380. Insert Delete GetRandom O(1) | 332. Reconstruct Itinerary |
368. Largest Divisible Subset | 377. Combination Sum IV |
322. Coin Change | 307. Range Sum Query - Mutable |
287. Find the Duplicate Number | 279. Perfect Squares |
275. H-Index II | 274. H-Index |
260. Single Number III | 240. Search a 2D Matrix II |
238. Product of Array Except Self | 229. Majority Element II |
222. Count Complete Tree Nodes | 215. Kth Largest Element in an Array |
198. House Robber | 153. Find Minimum in Rotated Sorted Array |
150. Evaluate Reverse Polish Notation | 144. Binary Tree Preorder Traversal |
137. Single Number II | 130. Surrounded Regions |
129. Sum Root to Leaf Numbers | 120. Triangle |
102. Binary Tree Level Order Traversal | 96. Unique Binary Search Trees |
75. Sort Colors | 74. Search a 2D Matrix |
71. Simplify Path | 62. Unique Paths |