DWITE Online Computer Programming Contest, October 2009, Problem 4
There are a lot of letters that come and go, but it's those unique letters that really stand out. And not just any unique letter, but the very first one of such. This is what we want to find in a word.
The input will contain 5 lines, each a single word of capital letters, at least and no more than characters long.
The output will contain 5 lines, each a single letter – the first letter (left-most) from a word, that is unique to that word.
It is guaranteed for such a letter to exist.
Sample Input
ABC
ABCA
ABCAB
Sample Output
A
B
C
Problem Resource: DWITE
Comments
shouldn't the sample input contain 5 lines? or did i misunderstand....
DWITE does not provide full cases for sample. The actual data will contain 5 lines, but the sample will not.