-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA.cpp
More file actions
60 lines (53 loc) · 1.77 KB
/
Copy pathA.cpp
File metadata and controls
60 lines (53 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef pair<int, int> pii;
typedef string str;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
#define all(x) (x).begin(),(x).end()
#define Sort(x) sort(all((x)))
#define X first
#define Y second
#define MP make_pair
#define pshb push_back
#define ppb pop_back
#define sep ' '
#define debug(x) cerr << #x << " = " << x << endl
#define SZ(x) ll(x.size())
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define set_random mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count())
#define getarr(arr, y) for(int i = 0; i < y; i++) cin >> arr[i]
#define printarr(arr, y) for(int i = 0; i < y; i++) cerr << i << " = " << arr[i] << endl
void solve(){
str s;
cin >> s;
if(s[SZ(s)-2] == 'p' && s[SZ(s)-1] == 'o'){
cout << "FILIPINO" << endl;
return;
}
if((s[SZ(s)-4] == 'd' && s[SZ(s)-3] == 'e' && s[SZ(s)-2] == 's' && s[SZ(s)-1] == 'u') ||
(s[SZ(s)-4] == 'm' && s[SZ(s)-3] == 'a' && s[SZ(s)-2] == 's' && s[SZ(s)-1] == 'u')){
cout << "JAPANESE" << endl;
return;
}
if(s[SZ(s)-5] == 'm' && s[SZ(s)-4] == 'n' && s[SZ(s)-3] == 'i' && s[SZ(s)-2] == 'd' && s[SZ(s)-1] == 'a'){
cout << "KOREAN" << endl;
return;
}
}
int main(){
fast_io;
int N;
cin >> N;
while(N --){
solve();
}
return 0;
}