-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFakeProfile.java
More file actions
29 lines (26 loc) · 974 Bytes
/
FakeProfile.java
File metadata and controls
29 lines (26 loc) · 974 Bytes
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
/**
* Created by MalhotR1 on 05/17/2017.
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class FakeProfile {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine().trim());
for (int t = 0; t < T; t++) {
char[] in = br.readLine().trim().toLowerCase().toCharArray();
int[] arr = new int[26];
for (int i = 0; i < in.length; i++) {
if (in[i] == 'a' || in[i] == 'e' || in[i] == 'i' || in[i] == 'o' || in[i] == 'u') continue;
arr[in[i] - 97]++;
}
int count = 0;
for (int i = 0; i < 26; i++) {
if (arr[i] > 0) count++;
}
if (count % 2 == 0) System.out.println("SHE!");
else System.out.println("HE!");
}
}
}