AIM Tech Round 3 (Div. 1)
A
Letters Cyclic Shift
Codeforces
1200
原题
←B →
翻译中…

You are given a non-empty string $*s*$ consisting of lowercase English letters. You have to pick exactly one non-empty substring of $*s*$ and shift all its letters 'z' image 'y' image 'x' image 'b' image 'a' image 'z'. In other words, each character is replaced with the previous character of English alphabet and 'a' is replaced with 'z'.

翻译中…

What is the lexicographically minimum string that can be obtained from $*s*$ by performing this shift exactly once?

翻译中…

Input

翻译中…

The only line of the input contains the string $*s*$ ($1 ≤ |*s*| ≤ 100 000$) consisting of lowercase English letters.

翻译中…

Output

翻译中…

Print the lexicographically minimum string that can be obtained from $*s*$ by shifting letters of exactly one non-empty substring.

翻译中…

Note

翻译中…

String $*s*$ is lexicographically smaller than some other string $*t*$ of the same length if there exists some $1 ≤ *i* ≤ |*s*|$, such that $*s*_{1} = *t*_{1}, *s*_{2} = *t*_{2}, ..., *s*_{*i* - 1} = *t*_{*i* - 1}$, and $*s*_{*i*} < *t*_{*i*}$.

翻译中…

样例

Input #1
codeforces
Output #1
bncdenqbdr
InputCopy OutputCopy
Input #2
abacaba
Output #2
aaacaba
InputCopy OutputCopy
题目信息
题号
708A
时间限制
1 s
内存限制
256 MB
标签
构造
贪心
模拟
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。