killjee has got a string s and he asks you to find a palindromic sub-sequence of that string for him. If there exist multiple such string he wants the one which is laxicographically smallest.
INPUT FORMAT
Only line of input contains a string s.
OUTPUT FORMAT
Print a palindromic string which is sub-sequence of string s. If multiple answers exist output the one which is lexicographically smallest.
Print 1 if no such subsequence is present in the string.
INPUT CONSTRAINTS
1≤|s|≤106
Only subsequence of the given string is string itself which is palindromic.