-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBeecrowd1272.java
More file actions
31 lines (28 loc) · 825 Bytes
/
Beecrowd1272.java
File metadata and controls
31 lines (28 loc) · 825 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
30
31
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Beecrowd1272 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
while (n>0){
String st = sc.nextLine();
String[] word = st.split(" ");
String[] newWord = new String[word.length];
int c = 0;
for (int i = 0; i < word.length; i++) {
if (word[i] != ""){
newWord[c] = word[i];
c++;
}
}
for(int i = 0; i < c; i++) {
System.out.print(newWord[i].charAt(0));
}
System.out.println();
n--;
}
}
}