## LCC/Moose '18 Contest 3 J3 - Emoji Search

View as PDF

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type

On Discord, emojis can be sent easily by formatting an emoji in form :x:, where x is a string containing alphanumeric characters and spaces that identifies the emoji. For example, :thinking: would result in the thinking emoji being shown. Emoji matches are lazy, that is they will contain the least amount of characters as possible. Also, note that each : can only be used in one emoji. That is, :x:y: would only result in the x emoji being shown.

Can you write a program that outputs a list of the emojis 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