CF202A LLPS

Description

This problem's actual name, "Lexicographically Largest Palindromic Subsequence" is too long to fit into the page headline. You are given string $ s $ consisting of lowercase English letters only. Find its lexicographically largest palindromic subsequence. We'll call a non-empty string $ s[p_{1} $ $ p_{2}...\ p_{k}] $ = $ s_{p1}s_{p2}...\ s_{pk} $ ( $ 1 $ $

Input Format

The only input line contains a non-empty string $ s $ consisting of lowercase English letters only. Its length does not exceed $ 10 $ .

Output Format

Print the lexicographically largest palindromic subsequence of string $ s $ .

Explanation/Hint

Among all distinct subsequences of string "radar" the following ones are palindromes: "a", "d", "r", "aa", "rr", "ada", "rar", "rdr", "raar" and "radar". The lexicographically largest of them is "rr".