|
||||||||||
Best StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 435 Accepted Submission(s): 156 Problem Description Given a string, you use some letters or digits to creat a new string, this new string have three properties. 1. any two adjacent letter aren't the same. 2. the new string have the biggest length. 3. the new string have the biggest lexicographical ordering. Input The input consists of multiple test cases. Each test case contain a string, the string is consist of 'a'~'z', 'A' - 'Z' and '0' - '9'. the length of string is not exceed 500. Output For each case, print the new string. Sample Input
Sample Output
Author luzilon1 Source | ||||||||||
|