#K42112. Lexicographical Reduction

    ID: 27016 Type: Default 1000ms 256MiB

Lexicographical Reduction

Lexicographical Reduction

You are given a string s consisting of lowercase English letters. In one operation, you can choose two adjacent characters and replace them with the larger of the two according to lexicographical order. You can apply this operation repeatedly until only one character remains.

It can be proven that the final remaining character is the maximum character from the original string, that is, it is given by \(\max_{1 \le i \le n} s_i\). Your task is to compute this character.

inputFormat

The input consists of a single line containing the non-empty string s of lowercase English letters.

Constraints: \(1 \leq |s| \leq 10^5\).

outputFormat

Output a single character — the result after performing the operations, which is the maximum character in the string.

## sample
acbd
d