## Emoji Search

View as PDF

Points: 5
Time limit: 2.0s
Memory limit: 64M

Author:
Problem types

Emojis can be sent easily by formatting an emoji in the form :x:, where x is a string containing alphanumeric characters and spaces that identifies the emoji. This is called an identifier. Emojis are always scanned left to right and terminate at the first colon. After an emoji is found, the identifier and the colons that surround it are replaced with a character that represents the specific emoji, called an emoji character. The scanning then continues at the emoji character until the end of the string.

Can you write a program that outputs a list of emoji identifiers in a sentence?

#### Input Specification

The first line will contain a sentence , the sentence to check for emojis. Sentence will only contain alphanumeric characters, colons, and spaces. It is guaranteed there will be no adjacent spaces and colons, and no trailing/leading spaces.

#### Output Specification

Output the emoji names in the sentence in the order they appear in the sentence, one emoji name per line. It is guaranteed there will be at least one emoji.

#### Sample Input 1

JavaScript is the best language in the world :smiley:

#### Sample Output 1

smiley

#### Sample Input 2

:hudab: :hudab: :hudab: :hudab:

#### Sample Output 2

hudab
hudab
hudab
hudab

#### Sample Input 3

aosij:a sd:asio:asoi:asd:

#### Sample Output 3

a sd
asoi

• commented on April 28, 2019, 6:31 p.m.

LMAO I thought it was |S| 1000 for too long..

• commented on April 27, 2019, 8:16 p.m.

WLMOJ is leaking...

• commented on April 28, 2019, 10:50 a.m.

whats wlmoj

• commented on April 28, 2019, 11:27 a.m.