Back
Close

Simple Word Abbreviator

Statement

 Goal

You need to abbreviate the given text by replacing every string surrounded by < and > with the appropriate acronym.

An acronym is a word formed from the initial letters of a every word in the original string.
Example:
<Crime Scene Investigation> => CSI
<North Atlantic Treaty Organization> => NATO
Input
message
Output
abbreviated_message
Constraints
0 < Length of message < 125
Example
Input
I came first in <International Math Olympiad>, <laugh out loud>
Output
I came first in IMO, lol

Game modes
Fastest, Shortest, Reverse

Test cases
Test 1 Test
Input
I came first in <International Math Olympiad>, <laugh out loud>
Output
I came first in IMO, lol

Validator 1 Validator
Input
I came first in <International Science Olympiad Of Greatness>, <laugh out loud>
Output
I came first in ISOOG, lol

Test 2 Test
Input
<dog or god>, don't choose dog
Output
dog, don't choose dog

Validator 2 Validator
Input
<what the f***>, I am better then you any-day
Output
wtf, I am better then you any-day

Test 3 Test
Input
The <Global Environment Facility> makes it easy to see <you only live once>
Output
The GEF makes it easy to see yolo

Validator 3 Validator
Input
when you <go to hell> you <go to heaven>
Output
when you gth you gth

Test 4 Test
Input
<hyper text markup language> or java perhaps <pant yant tant hant oant nant> or maybe <rugby under bombs yorky>
Output
html or java perhaps python or maybe ruby

Validator 4 Validator
Input
i have a <Masters Degree> in math and <Bachelor's Degree> in greatness
Output
i have a MD in math and BD in greatness

Test 5 Test
Input
<laughing out loud> <got to go> <talk to you later> <hope you enjoyed>
Output
lol gtg ttyl hye

Validator 5 Validator
Input
<some people like> <other people> <but sometimes> <i hate> abbreviations
Output
spl op bs ih abbreviations

Test 6 Test
Input
<no more spaces><for quite some time><Hopefully N##>
Output
nmsfqstHN

Validator 6 Validator
Input
<i feel><like not spacing><right now>
Output
iflnsrn

Solution language

Solution

Stub generator input