文理学院程序设计在线练习


Pretty String

Time Limit: 1 Second(s)    Memory Limit: 32 MB

Total Submission(s): 60   Accepted Submission(s): 45
Problem Description

Biving like everything being uniform. One day, Biving got some strings from a mystical man. Biving wants to discard all letters from this string which are not uniform with the first letter. In Biving’s opinion, there are three kind of letters: lower-case letters upper-case letters and digits.
Give you some strings, find the string Biving wants.

Input

The input contains several test cases (<=1000). Each test case contains a string S in a single line (1 <= length(S) <= 1000). S contains only lower-case letters upper-case letters and digits.

Output

For each test case, output a string Biving wants in a single line.

Sample Input
iABlove98you
DOaaYOU87LOVE34ME
5ab2BA0ab2
Sample Output
iloveyou
DOYOULOVEME
5202
Source

2013绍兴市赛