time limit per test
1 second
memory limit per test
256 megabytes
Trippi Troppi resides in a strange world. The ancient name of each country consists of three strings. The first letter of each string is concatenated to form the country's modern name.
Given the country's ancient name, please output the modern name.
Input
The first line contains an integer tt – the number of independent test cases (1≤t≤1001≤t≤100).
The following tt lines each contain three space-separated strings. Each string has a length of no more than 1010, and contains only lowercase Latin characters.
Output
For each test case, output the string formed by concatenating the first letter of each word.
Example
Input
Copy
7
united states america
oh my god
i cant lie
binary indexed tree
believe in yourself
skibidi slay sigma
god bless america
Output
Copy
usa omg icl bit biy sss gba
解题说明:水题,每个字符串取第一个字母即可。
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
char a[12], b[12], c[12];
cin >> t;
while (t--)
{
scanf("%s %s %s\n", &a, &b, &c);
printf("%c%c%c\n", a[0], b[0], c[0]);
}
return 0;
}