A. Letters Cyclic Shift

хугацааны хязгаарлалт 1 секунд

санах ойн хязгаарлалт 256 мегабайт

оролт стандарт оролт

гаралт стандарт гаралт

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' 'y' 'x' 'b' 'a' '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?

Оролт

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

Гаралт

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

Орчуулсан: [орчуулагдаж байгаа]

Жишээ тэстүүд

Оролт
codeforces
Гаралт
bncdenqbdr
Оролт
abacaba
Гаралт
aaacaba

Тэмдэглэл

String s is lexicographically smaller than some other string t of the same length if there exists some 1 ≤ i ≤ |s|, such that s1 = t1, s2 = t2, ..., si - 1 = ti - 1, and si < ti.

Сэтгэгдлүүдийг ачааллаж байна...