[요약] - 로 연결된 이름의 첫 자를 출력하는 문제
For example, the most popular asymmetric cryptography system, RSA was discovered by Rivest, Shamir and Adleman. Another notable example is the KnuthMorris-Pratt algorithm, named by Knuth, Morris and Pratt.
Scientific papers reference earlier works a lot and it's not uncommon for one document to use two different naming conventions: the short variation (e.g. KMP) using only the first letters of authors last names and the long variation (e.g. Knuth-Morris-Pratt) using complete last names separated by hyphens.
We find mixing two conventions in one paper to be aesthetically unpleasing and would like you to write a program that will transform long variations into short.
입력 Knuth-Morris-Pratt 출력 KMP 입력 Mirko-Slavko 출력 MS 입력 Pasko-Patak 출력 PP
출처:coci 2009-2010 contest4 1/6