P7694 [COCI 2009/2010 #4] AUTORI
Background
Great scientific discoveries are usually named after the scientists’ last names. For example, the most popular asymmetric cryptosystem RSA was discovered by three scientists named Rivest, Shamir, and Adleman. Another even more well-known example is the Knuth-Morris-Pratt algorithm, which is named after three scientists named Knuth, Morris, and Pratt.
Description
Scientific papers often cite many earlier works, so it is not uncommon for two different naming conventions to appear in the same paper. These two naming conventions are:
- Long form, which consists of the full word of each author’s last name connected by hyphens, such as `Knuth-Morris-Pratt`.
- Short form, which consists only of the first character of each author’s last name concatenated together, such as `KMP`.
Now, you find that a paper uses both the long form and the short form at the same time, which makes you unhappy. Therefore, you want to write a program to convert all long forms into short forms.
Input Format
The input contains only one line: a string representing the long form that appears in the paper.
The first letter of each word in the long form is **guaranteed to be an uppercase letter**.
Output Format
Output only one line: a string representing the short form after converting the long form.
Explanation/Hint
**Constraints**
For all testdata, the length of the string does not exceed $100$, and it contains only uppercase and lowercase English letters and the hyphen `-`.
**Source**
This problem comes from **_[COCI 2009-2010](https://hsin.hr/coci/archive/2009_2010/) [CONTEST 4](https://hsin.hr/coci/archive/2009_2010/contest4_tasks.pdf) T1 AUTORI_**. With the original testdata settings, the full score is $30$ points.
Translated, organized, and provided by [Eason_AC](https://www.luogu.com.cn/user/112917).
Translated by ChatGPT 5