跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1120. Letters Cyclic Shift

  • ID: 1126
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:基础
  • 上传者:
  • 构造
  • 贪心
  • 模拟
  • 字符串
  • 算法思想
  • 编程与模拟
  • 基础
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

Letters Cyclic Shift

题目描述

A. Letters Cyclic Shift
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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?

Input

The only line of the input contains the string s (1≤|s|≤100000) 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.

Examples
Input
codeforces
Output
bncdenqbdr
Input
abacaba
Output
aaacaba
Note

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.


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 587 题。保留原作者与原赛事署名。