Palindrome#5207

Palindrome

1 second
64 megabytes
Easy

A palindrome is a sequence of characters that reads the same forwards and backwards.

Your task is to determine the longest palindrome that can be formed from a given string by removing any number of characters (including none).

Input

The input consists of a single string , composed of lowercase Latin letters. The length of will not exceed characters.

Output

The output should be the longest palindrome you can obtain. If there are multiple palindromes of the same maximum length, you may output any one of them.

Examples

Example 1

Loading
Loading