Print first letter of every word in the string
Submissions: 1815   Accuracy:

21.41%

  Difficulty: Basic   Marks: 1

Given a string consisting of lowercase English letters and spaces (may or may not be multiple spaces). Your task is to print first letter of every word in the string.

Input:
The first line of input contains an integer T denoting the nuimber of test cases.Each test case consist of a string.

Output:
Print the first letter of every word in the given string.

Constraints:
1<=T<=100

Example:
Input:
2
geeks for geeks
bad is good
Output:
gfg
big

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Shubham Chaudhary
Author: Shubham Chaudhary gfg


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.