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' $\rightarrow$ 'y' $\rightarrow$ 'x' $\rightarrow \ldots \rightarrow$ 'b' $\rightarrow$ 'a' $\rightarrow$ '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.


-----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 s_1 = t_1, s_2 = t_2, ..., s_{i} - 1 = t_{i} - 1, and s_{i} < t_{i}.

Source: codeforces | Difficulty: EASY
Tags: Greedy algorithms

String algorithms

Implementation

Constructive algorithms


Solutions:
s = input()
s1 = ''
start = False
metka = False
i = 0
while i < len(s) and (not start):
	if s[i] != 'a' and (not start):
		s1 += chr(ord(s[i]) - 1)
		metka = True
	elif s[i] == 'a' and (not metka):
		s1 += s[i]
	elif s[i] == 'a' and metka:
		s1 += s[i:]
		start = True
	i += 1
if not metka:
	s1 = s[:-1] + 'z'
print(s1)


s = input()
f = 0
start = 0
ans = ''
for l in s:
	if l != 'a' and f == 0:
		ans += chr(ord(l) - 1)
		start = 1
	else:
		if l == 'a' and start == 1:
			f = 1
		ans += l
if ans != s:
	print(ans)
else:
	print(s[:-1] + 'z')


s = list(input())
count = 0
count1 = 0
y = 0
if s.count('a') == len(s):
	print('a' * (len(s) - 1) + 'z')
elif s[0] != 'a' or s[1] != 'a':
	for i in range(len(s)):
		if s[i] == 'a' and i != 0:
			count = 1
			print('a', end='')
			break
		elif s[i] == 'a' and i == 0:
			print('a', end='')
		else:
			print(chr(ord(s[i]) - 1), end='')
	if count == 1:
		for i in range(i + 1, len(s)):
			print(s[i], end='')
else:
	for i in range(len(s)):
		if s[i] == 'a':
			print('a', end='')
			count1 += 1
		else:
			break
	for j in range(i, len(s)):
		if s[j] != 'a':
			print(chr(ord(s[j]) - 1), end='')
			count1 += 1
		else:
			break
	for i in range(j, len(s)):
		if count1 < len(s):
			print(s[i], end='')


s = list(input())
n = len(s)
(strat, end) = (-1, -1)
for i in range(n):
	if s[i] > 'a' and strat == -1:
		strat = i
	elif s[i] == 'a' and strat != -1:
		end = i
		break
if end == -1:
	end = n
if strat == -1:
	s[n - 1] = 'z'
	print(''.join(s))
else:
	for i in range(strat, end):
		x = ord(s[i]) - 1
		s[i] = chr(x)
	print(''.join(s))


letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
dataIn = str(input())
data = []
for i in dataIn:
	data.append(i)
count = 0
begin = 0
if len(data) == 1:
	if data[0] == 'a':
		data[0] = 'z'
	else:
		for j in range(len(letters)):
			if letters[j] == data[0]:
				data[0] = letters[j - 1]
else:
	i = 0
	begin = False
	while i < len(data) - 1:
		if data[i] == 'a':
			i += 1
		else:
			break
	for k in range(i, len(data)):
		if data[k] == 'a' and k != len(data) - 1:
			break
		elif data[k] == 'a' and k == len(data) - 1:
			if not begin:
				data[k] = 'z'
		else:
			begin = True
			for j in range(len(letters)):
				if letters[j] == data[k]:
					data[k] = letters[j - 1]
result = ''
for i in data:
	result += i
print(result)


(a, s, iz) = ('', input(), 0)
if set(s) == {'a'}:
	a += s[:-1] + 'z'
elif len(set(s)) == 1:
	a += chr(ord(s[0]) - 1) * len(s)
while len(a) != len(s):
	if s[len(a)] != 'a':
		a += chr(ord(s[len(a)]) - 1)
		iz = 1
	elif s[len(a)] == 'a' and iz < 1:
		a += s[len(a)]
	else:
		a += s[len(a):]
print(a)


s = input()
indS = 0
foundA = False
indE = len(s)
for i in range(len(s)):
	if foundA:
		if s[i] == 'a':
			indE = i
			break
	if s[i] != 'a':
		if foundA == False:
			indS = i
		foundA = True
if foundA == False:
	indS = indE - 1
print(s[:indS], end='')
for i in range(indS, indE):
	print(chr(ord(s[i]) - 1 + (26 if ord(s[i]) - 1 < ord('a') else 0)), end='')
print(s[indE:])


s = input()
i = 0
if set(s) == {'a'}:
	print('a' * (len(s) - 1) + 'z')
	exit()
while i < len(s) and s[i] == 'a':
	print('a', end='')
	i += 1
while i < len(s) and s[i] != 'a':
	print(chr(ord(s[i]) - 1), end='')
	i += 1
while i < len(s):
	print(s[i], end='')
	i += 1
print()


s = input()
b = ''
i = 0
k = 0
l = 0
while i < len(s) and s[i] == 'a':
	i += 1
	k = i
while i < len(s) and s[i] != 'a':
	b += s[i]
	i += 1
	l = i
b1 = ''
for i in b:
	if ord(i) == 97:
		b1 += 'z'
	else:
		b1 += chr(ord(i) - 1)
if b1 == '':
	print(s[:len(s) - 1] + 'z')
else:
	print(s[:k] + b1 + s[l:])


s = t = list(input())
total = 0
start = False
for (i, c) in enumerate(s):
	if c == 'a':
		if start:
			break
		else:
			continue
	else:
		start = True
		t[i] = chr(ord(c) - 1)
		total += 1
if total == 0:
	t[-1] = 'z'
print(''.join(t))


s = list(input())
litera = 0
licznik = -1
litera2 = 0
for c in s:
	licznik += 1
	if c == 'a' and litera == 1:
		litera2 = 1
	if c != 'a':
		litera = 1
	if litera == 0:
		continue
	if litera2 == 1:
		continue
	s[licznik] = chr(ord(s[licznik]) - 1)
if litera == 0:
	s[licznik] = 'z'
print(''.join(s))


import sys
s = input()
L = len(s)
t = ''
i = 0
while i < L and s[i] == 'a':
	t += s[i]
	i += 1
if len(t) == L:
	print(s[:L - 1] + 'z')
	sys.exit()
while i < L and s[i] != 'a':
	t += chr(ord(s[i]) - 1)
	i += 1
t += s[i:]
print(t)


s = [i for i in input()]
flag = False
for i in range(len(s)):
	if s[i] > 'a':
		flag = True
		s[i] = chr(ord(s[i]) - 1)
	elif flag:
		break
if not flag:
	s[-1] = 'z'
print(*s, sep='')


s = input()
if len(set(s)) == 1 and s[0] == 'a':
	print(s[:-1] + 'z')
	exit()
j = 0
for i in range(len(s)):
	if s[i] == 'a' and j != 0:
		print(s[i:])
		break
	elif s[i] == 'a':
		print(s[i], end='')
	else:
		j += 1
		print(chr(ord(s[i]) - 1), end='')
print()


s = list(input())
f = False
c = False
for i in range(len(s)):
	ss = s[i]
	if ss == 'a':
		if f is True:
			print(''.join(s))
			return
		else:
			continue
	else:
		s[i] = chr(ord(ss) - 1)
		f = True
		c = True
if c is False:
	s[-1] = 'z'
print(''.join(s))


def move(s):
	new_s = ''
	for i in range(len(s)):
		new_s += chr(ord(s[i]) - 1)
	return new_s
s = input()
st = -1
fi = -1
for i in range(len(s)):
	if st == -1 and s[i] != 'a':
		st = i
	elif st != -1 and s[i] == 'a':
		fi = i
		break
if st != -1 and fi != -1:
	print(s[:st], move(s[st:fi]), s[fi:], sep='')
elif st != -1 and fi == -1:
	print(s[:st], move(s[st:]), sep='')
elif st == -1 and fi == -1:
	print(s[:-1], 'z', sep='')


tokens = []
tokens_next = 0

def nextStr():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = input().split()
		tokens_next = 0
	tokens_next += 1
	return tokens[tokens_next - 1]

def nextInt():
	return int(nextStr())

def nextIntArr(n):
	return [nextInt() for i in range(n)]

def shift(c):
	if c == 'a':
		return 'z'
	res = ord(c) - 1
	return chr(res)
s = nextStr()
nonA = next((i for i in range(len(s)) if s[i] != 'a'), len(s))
if nonA == len(s):
	print(s[:-1] + shift(s[-1]))
	exit(0)
nextA = next((i for i in range(nonA, len(s)) if s[i] == 'a'), len(s))
print(s[:nonA] + ''.join((shift(c) for c in s[nonA:nextA])) + s[nextA:])


S = input()
N = len(S)
if N == 1:
	if S == 'a':
		print('z')
	else:
		c = chr(ord(S) - 1)
		print(c)
	exit()
start = -1
stop = -1
for (i, s) in enumerate(S):
	if start == -1 and s != 'a':
		start = i
		continue
	if start != -1 and s == 'a':
		stop = i - 1
		break
if start == -1:
	ans = list(S)
	ans[-1] = 'z'
	print(''.join(ans))
	exit()
if stop == -1:
	stop = N - 1
ans = ''
for (i, s) in enumerate(S):
	c = s
	if start <= i <= stop:
		c = chr(ord(s) - 1)
	ans += c
print(ans)


s = input()
t = ''
l = len(s)
a = 'a' * l
if s == a:
	t = 'a' * (l - 1) + 'z'
else:
	i = 0
	while i < l:
		if s[i] == 'a':
			t += 'a'
		else:
			break
		i += 1
	while i < l:
		if s[i] != 'a':
			t += str(chr(ord(s[i]) - 1))
		else:
			break
		i += 1
	while i < l:
		t += str(s[i])
		i += 1
print(t)


s = list(input())
i = f = 0
while i < len(s):
	while i < len(s) and s[i] != 'a':
		s[i] = chr(ord(s[i]) - 1)
		f = 1
		i += 1
	if f:
		break
	i += 1
if f == 0:
	s[len(s) - 1] = 'z'
print(''.join(s))


s = list(input())
started = False

def flip(c):
	return chr((ord(c) - 1 - ord('a')) % 26 + ord('a'))
for i in range(len(s)):
	if s[i] == 'a' and started:
		break
	if s[i] != 'a':
		s[i] = flip(s[i])
		started = True
if not started:
	s[-1] = flip(s[-1])
print(''.join(s))


import sys
s = sys.stdin.readline().strip()

def ceaser(s):
	alph = {'a': 'z'}
	for ch in range(ord('b'), ord('z') + 1):
		alph[chr(ch)] = chr(ch - 1)
	retS = ''
	aaa = 0
	pos = 0
	while pos < len(s) and s[pos] == 'a':
		aaa += 1
		pos += 1
	try:
		last_letter = s[pos]
	except:
		last_letter = 'b'
	add_letters = 0
	while pos < len(s) and s[pos] != 'a':
		if last_letter == s[pos]:
			add_letters += 1
		else:
			retS = retS + alph[last_letter] * add_letters
			add_letters = 1
			last_letter = s[pos]
		pos += 1
	retS = retS + alph[last_letter] * add_letters
	if aaa == len(s):
		retS = 'a' * (aaa - 1) + 'z'
	else:
		retS = 'a' * aaa + retS + s[pos:]
	return retS

def doTest():
	assert ceaser('codeforces') == 'bncdenqbdr'
	assert ceaser('abacaba') == 'aaacaba'
print(ceaser(s))


s = input()
flag = 0
if s.count('a') == len(s):
	print(s[:-1] + 'z')
	exit()
for i in range(len(s)):
	if flag == 2:
		print(s[i], end='')
	elif s[i] == 'a':
		if flag == 1:
			flag = 2
		print('a', end='')
	elif s[i] > 'a' and flag != 2:
		print(chr(ord(s[i]) - 1), end='')
		flag = 1


str = list(input())
i = 0
n = len(str)
for c in str:
	if c != 'a':
		break
	i = i + 1
if i == n:
	str[-1] = 'z'
else:
	while i < n and str[i] != 'a':
		str[i] = chr(ord(str[i]) - 1)
		i += 1
print(''.join(str))


import sys
s = input()
if len(set(s)) == 1 and s[0] == 'a':
	print(s[:-1] + 'z')
	sys.exit(0)
z = 0
while z < len(s) and s[z] == 'a':
	print('a', end='')
	z += 1
while z < len(s) and s[z] != 'a':
	print(chr(ord(s[z]) - 1), end='')
	z += 1
while z < len(s):
	print(s[z], end='')
	z += 1


def __starting_point():
	refer_dict = {'a': 'z', 'b': 'a', 'c': 'b', 'd': 'c', 'e': 'd', 'f': 'e', 'g': 'f', 'h': 'g', 'i': 'h', 'j': 'i', 'k': 'j', 'l': 'k', 'm': 'l', 'n': 'm', 'o': 'n', 'p': 'o', 'q': 'p', 'r': 'q', 's': 'r', 't': 's', 'u': 't', 'v': 'u', 'w': 'v', 'x': 'w', 'y': 'x', 'z': 'y'}
	s = str(input())
	line = s.split('a')
	size = len(line)
	flag = True
	for it in range(size):
		if line[it] != '':
			temp = str()
			for i in line[it]:
				temp += refer_dict[i]
			line[it] = temp
			flag = False
			break
	if flag:
		print(s[:-1] + 'z')
	else:
		print('a'.join(line))
__starting_point()


a = list(input())
b = []
if a[0] != 'a':
	for i in range(len(a)):
		if a[i] != 'a':
			b.append(chr(ord(a[i]) - 1))
		else:
			break
	if a[i] == 'a':
		b.extend(a[i:])
	print(''.join(b))
elif a.count('a') < len(a):
	j = 0
	while a[j] == 'a':
		b.append('a')
		j += 1
	for i in range(j, len(a)):
		if a[i] != 'a':
			b.append(chr(ord(a[i]) - 1))
		else:
			break
	if a[i] == 'a':
		b.extend(a[i:])
	print(''.join(b))
else:
	print('a' * (len(a) - 1) + 'z')


s = list(input())
l = len(s)
if s.count('a') == l:
	s[-1] = 'z'
else:
	k = 0
	for i in range(l):
		if s[i] == 'a':
			k += 1
		else:
			break
	for i in range(k, l):
		if s[i] != 'a':
			s[i] = chr(ord(s[i]) - 1)
		else:
			break
print(''.join(s))


s = input()
l = len(s)
a1 = a2 = 1000000
q = []
k = 0
b = ''
j = 0
if 'a' in s:
	for i in s:
		if i == 'a':
			if len(q) > 0 and j - q[-1] > 1:
				q.append(j)
				k = j
				break
			q.append(j)
		j += 1
	if len(q) == l:
		print('a' * (l - 1) + 'z')
		exit()
	if q[0] > 0:
		for i in range(0, q[0]):
			b += chr(ord(s[i]) - 1)
		b += s[q[0]:]
		print(b)
		exit()
	if len(q) == 1:
		b += 'a'
		for i in range(1, l):
			b += chr(ord(s[i]) - 1)
	else:
		if s[:q[len(q) - 1] + 1] == 'a' * len(q):
			b += 'a' * len(q)
			for i in range(q[len(q) - 1] + 1, l):
				b += chr(ord(s[i]) - 1)
			print(b)
			exit()
		else:
			b += s[:q[len(q) - 2] + 1]
		for i in range(q[len(q) - 2] + 1, k):
			b += chr(ord(s[i]) - 1)
		if len(q) > 1:
			b += s[k:]
	print(b)
else:
	for i in range(l):
		b += chr(ord(s[i]) - 1)
	print(b)


s = input()
t = ''
x = 0
for c in s:
	if c != 'a':
		break
	t += str(c)
	x += 1
if x >= len(s):
	t = t[:len(s) - 1] + 'z'
y = x
for c in s[x:]:
	if c == 'a':
		break
	a = ord(c)
	a -= 1
	t += str(chr(a))
	y += 1
for c in s[y:]:
	t += str(c)
print(t)


s = input().split('a')
n = len(s)
for i in range(n):
	if s[i]:
		s[i] = ''.join((chr(ord(ch) - 1) for ch in s[i]))
		print('a'.join(s))
		break
else:
	print('a' * (n - 2) + 'z')


s = list(input())
flag = 0
for i in range(len(s)):
	if s[i] == 'a':
		if flag == 1:
			break
	else:
		flag = 1
		s[i] = chr(ord(s[i]) - 1)
if flag == 0:
	s[-1] = 'z'
print(''.join(s))


import sys
import itertools

def read_data():
	s = next(sys.stdin).strip()
	return s

def solve(s):
	characters = []
	state = 0
	for c in s:
		if state == 0:
			if c == 'a':
				characters.append(c)
			else:
				state = 1
		if state == 1:
			if c == 'a':
				state = 2
			else:
				characters.append(chr(ord(c) - 1))
		if state == 2:
			characters.append(c)
	if state == 0:
		characters[-1] = 'z'
	return ''.join(characters)
s = read_data()
ans = solve(s)
print(ans)


s = input()
answer = ''
started = False
for i in range(len(s)):
	el = s[i]
	if el == 'a' and (not started):
		answer += 'a'
	elif el == 'a' and started:
		print(answer + s[i:])
		exit(0)
	else:
		started = True
		answer += chr(ord(el) - 1)
if not started:
	print(s[:-1] + 'z')
else:
	print(answer)


t = input()
for (i, c) in enumerate(t):
	if c != 'a':
		if 'a' in t[i:]:
			last_a = t[i:].index('a') + i
			print(t[:i] + ''.join((chr(ord(x) - 1) for x in t[i:last_a])) + t[last_a:])
		else:
			print(t[:i] + ''.join((chr(ord(x) - 1) for x in t[i:])))
		break
else:
	print(t[:-1] + 'z')


def shifts(s, ini, f):
	sam = list('abcdefghijklmnopqrstuvwxyz')
	po = ''
	for i in range(ini, f + 1):
		po += sam[(sam.index(s[i]) + 25) % 26]
	return s[:ini] + po + s[f + 1:]
s = input().strip()
inindex = 0
ans = ''
if s[0] == 'a':
	for i in range(len(s)):
		if s[i] != 'a':
			inindex = i
			break
	if inindex == 0:
		ans = shifts(s, len(s) - 1, len(s) - 1)
	else:
		po = 0
		if s[inindex:].__contains__('a'):
			po = inindex + s[inindex:].index('a')
		else:
			po = len(s)
		ans = shifts(s, inindex, po - 1)
else:
	po = 0
	if s.__contains__('a'):
		po = s.index('a') - 1
	else:
		po = len(s) - 1
	ans = shifts(s, 0, po)
print(ans)


a = input().replace('', ' ').split()
l = len(a)
r = -1
ok = False
for i in range(len(a)):
	if a[i] != 'a' and (not ok):
		l = i
		r = i
		ok = True
	if ok:
		if a[i] == 'a':
			break
		else:
			r = i
if not ok:
	a[-1] = 'z'
	print(*a, sep='')
	exit()
for i in range(len(a)):
	if l <= i and r >= i:
		print(chr(ord(a[i]) - 1), end='')
	else:
		print(a[i], end='')


import sys

def shl(s, be, en):
	t = s[:be]
	for i in range(be, en):
		if s[i] == 'a':
			t += 'z'
		else:
			t += chr(ord(s[i]) - 1)
	return t + s[en:]
s = input()
i = 0
L = len(s)
while i < L and s[i] == 'a':
	i += 1
if i == L:
	print(s[:L - 1] + 'z')
	sys.exit()
j = i + 1
while j < L and s[j] != 'a':
	j += 1
print(shl(s, i, j))


s = list(map(str, input()))
for i in range(len(s)):
	if s[i] != 'a':
		break
if i == len(s) - 1 and s[-1] == 'a':
	s[-1] = 'z'
	i += 1
while i != len(s) and s[i] != 'a':
	s[i] = chr(ord(s[i]) - 1)
	i += 1
print(''.join(s))


from sys import stdin
phrase = input()
i = 0
while i < len(phrase) and phrase[i] == 'a':
	i += 1
j = i
while j < len(phrase) and phrase[j] != 'a':
	j += 1
if i >= len(phrase):
	print(phrase[:-1] + 'z')
else:
	nouvellePhrase = phrase[:i]
	for indice in range(i, j):
		caractere = phrase[indice]
		nouvelIndice = (ord(caractere) - ord('a') - 1) % 26
		car = chr(nouvelIndice + ord('a'))
		nouvellePhrase += car
	nouvellePhrase += phrase[j:]
	print(nouvellePhrase)


def findNot(string, char):
	for i in range(len(string)):
		if string[i] != char:
			return i
	return len(string) - 1
s = input()
beg = findNot(s, 'a')
res = s[0:beg]
for i in range(beg, len(s)):
	if i != beg and s[i] == 'a':
		res += s[i:]
		break
	if s[i] == 'a':
		res += 'z'
	else:
		res += chr(ord(s[i]) - 1)
print(res)


s = list(input())
n = len(s)
(start, end) = (-1, -1)
for i in range(n):
	if s[i] > 'a' and start == -1:
		start = i
	elif s[i] == 'a' and start != -1:
		end = i
		break
if end == -1:
	end = len(s)
if start == -1:
	s[n - 1] = 'z'
else:
	for i in range(start, end):
		x = ord(s[i]) - 1
		s[i] = chr(x)
print(*s, sep='')


def listtostring(L):
	t = ''
	for i in range(0, len(L)):
		t += L[i]
	return t
L = list(input())
n = len(L)
if min(L) != 'a':
	for i in range(0, len(L)):
		L[i] = chr(ord(L[i]) - 1)
elif max(L) == 'a':
	L[n - 1] = 'z'
else:
	for i in range(0, len(L)):
		if L[i] != 'a':
			while i < len(L) and L[i] != 'a':
				L[i] = chr(ord(L[i]) - 1)
				i += 1
			break
print(listtostring(L))


alphabet = 'abcdefghijklmnopqrstuvwxyz'
s = input()
ar = list()
for i in range(len(s)):
	ar.append(s[i])
pl = 0
while pl < len(s) and s[pl] == 'a':
	pl += 1
pr = pl
while pr < len(s) and s[pr] != 'a':
	let = ar[pr]
	ar[pr] = alphabet[alphabet.find(let) - 1]
	pr += 1
if pl == len(s):
	print('a' * (len(s) - 1) + 'z')
else:
	print(''.join(ar))


s = input()
table = 'abcdefghijklmnopqrstuvwxyz'

def nextchar(x):
	index = table.index(x)
	return table[index - 1]
(ans, start) = ('', 0)
for i in range(len(s)):
	if s[i] != 'a':
		ans += nextchar(s[i])
		start = 1
		continue
	if s[i] == 'a' and start == 1:
		ans += s[i:len(s)]
		break
	ans += s[i]
if str(s).count('a') == len(s):
	ans = str(s)[0:len(s) - 1] + 'z'
print(ans)


s = input()
l = 'abcdefghijklmnopqrstuvwxyz'
k = ''
i = 0
while s[i] == 'a' and i < len(s) - 1:
	i = i + 1
k = s[:i]
for j in range(i, len(s)):
	if s[j] != 'a':
		k += l[l.find(s[j]) - 1]
	else:
		break
for f in range(len(k), len(s)):
	k += s[f]
if s.count('a') == len(s):
	print(s[:len(s) - 1] + 'z')
else:
	print(k)


def shift():
	word = input()
	i = 0
	shifted = ''
	while i < len(word) - 1:
		if word[i] != 'a':
			break
		shifted += word[i]
		i += 1
	if i == len(word) - 1 and word[i] == 'a':
		shifted += 'z'
		return shifted
	while i < len(word):
		if word[i] == 'a':
			shifted += word[i:]
			break
		shifted += chr(ord(word[i]) - 1)
		i += 1
	return shifted
print(shift())


import sys
n = input()
i = 0
n = n + 'a'
m = ''
while n[i] == 'a' and len(n) > i + 1:
	i += 1
	m = m + 'a'
if i + 1 == len(n):
	w = m[0:len(m) - 1] + 'z'
	print(w)
	return
while n[i] != 'a' and len(n) > i:
	m = m + chr(ord(n[i]) - 1)
	i += 1
m = m + n[i:len(n) - 1]
print(m)


s = input()
start = -1
end = -1
for i in range(len(s)):
	if s[i] != 'a':
		if start < 0:
			start = i
			end = i
		else:
			end = i
	if s[i] == 'a' and start >= 0:
		break
if start < 0:
	print(s[0:len(s) - 1], end='')
	print('z')
else:
	for i in range(len(s)):
		if start <= i <= end:
			if s[i] == 'a':
				print('z', end='')
			else:
				print(chr(ord(s[i]) - 1), end='')
		else:
			print(s[i], end='')


s = input()
i = 0
while i < len(s) and s[i] == 'a':
	i += 1
p = ''
j = len(s)
if i == len(s):
	s = s[:-1] + 'z'
else:
	j = i
	while j < len(s) and s[j] != 'a':
		p = p + chr(ord(s[j]) - 1)
		j += 1
print(s[:i] + p + s[j:])


s = input()
x = list(s)
start = 0
finish = len(s)
last = ''
for i in range(len(s)):
	if s[i] == 'a':
		if last == 'a' or i == 0:
			start = i + 1
		elif finish == len(s):
			finish = i
			break
	last = s[i]
for i in range(start, finish):
	x[i] = str(chr(ord(s[i]) - 1))
if start != finish:
	print(''.join(map(str, x)))
else:
	print(s[:-1] + 'z')


s = list(input())
i = 0
while i < len(s) and s[i] == 'a':
	i += 1
if i == len(s):
	s[-1] = 'z'
else:
	while i < len(s) and s[i] != 'a':
		s[i] = chr(ord(s[i]) - 1)
		i += 1
print(''.join(s))


s = input()
j = len(s)
k = len(s)
for i in range(len(s)):
	if s[i] != 'a':
		j = i
		break
for i in range(j + 1, len(s)):
	if s[i] == 'a':
		k = i
		break
if j == len(s) and k == len(s):
	print(s[:-1] + 'z')
else:
	print(s[:j] + ''.join([chr(ord(i) - 1) if i != 'a' else 'a' for i in s[j:k]]) + s[k:])


string = input()
if string.count('a') == len(string):
	string = list(string)
	string[len(string) - 1] = 'z'
	print(''.join(string))
	exit()
started = False
string = list(string)
for i in range(len(string)):
	if started:
		if string[i] == 'a':
			print(''.join(string))
			exit()
		else:
			string[i] = chr(ord(string[i]) - 1)
	elif string[i] != 'a':
		started = True
		string[i] = chr(ord(string[i]) - 1)
print(''.join(string))


a = input()
b = ''
fla = 0
f2 = 0
ii = 0
for i in range(0, len(a)):
	if ii == 0 and i == len(a) - 1:
		if a[i] == 'a':
			b += 'z'
		else:
			b += chr(ord(a[i]) - 1)
	elif a[i] == 'a':
		b += 'a'
		if f2:
			fla = 1
	elif not fla:
		b += chr(ord(a[i]) - 1)
		f2 = 1
		ii = 1
	else:
		b += a[i]
print(b)


from sys import stdin, exit
s = stdin.readline().strip()
if len(set(s)) == 1 and s[0] == 'a':
	print(s[:-1], 'z', sep='')
	exit(0)
changing = False
to = len(s)
for (i, c) in enumerate(s):
	if c != 'a' and (not changing):
		changing = True
		from_ = i
	elif c == 'a' and changing:
		to = i
		break
print(s[:from_], ''.join((chr(ord(c) - 1) for c in s[from_:to])), s[to:], sep='')


s = input()
i = 0
j = 1
curr = 0
state = 0
for k in s:
	if k == 'a':
		if state == 1:
			state = 2
		if state == 0:
			i = curr
			j = i + 1
		curr += 1
	elif state == 0:
		i = curr
		j = i + 1
		state = 1
		curr += 1
	elif state == 1:
		j += 1
		curr += 1
	elif state == 2:
		break
rev = ''
alphabet = 'abcdefghijklmnopqrstuvwxyza'
d = dict()
for k in range(1, 27):
	d[alphabet[k]] = alphabet[k - 1]
for k in range(i, j):
	rev += d[s[k]]
print(s[:i] + rev + s[j:])


s = list(input())
a = 0
if set(s) == {'a'}:
	s[-1] = '{'
for i in range(len(s)):
	if a == 0:
		if s[i] == 'a':
			continue
		else:
			s[i] = chr(ord(s[i]) - 1)
			a = 1
	elif s[i] == 'a':
		break
	else:
		s[i] = chr(ord(s[i]) - 1)
print(''.join(s))


class CodeforcesTask708ASolution:

	def __init__(self):
		self.result = ''
		self.string = ''

	def read_input(self):
		self.string = input()

	def process_task(self):
		s = -1
		e = -1
		for x in range(len(self.string)):
			if s >= 0:
				if self.string[x] == 'a' and e < 0:
					e = x
			elif self.string[x] != 'a':
				if s < 0:
					s = x
		if s == -1 and e == -1:
			s = len(self.string) - 1
			e = s + 1
		elif e == -1:
			e = len(self.string)
		out = list(self.string)
		for x in range(len(out)):
			if s <= x < e:
				out[x] = chr(ord(out[x]) - 1)
		self.result = ''.join(out).replace('`', 'z')

	def get_result(self):
		return self.result
Solution = CodeforcesTask708ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


s = input()
dp = [0] * len(s)
ans = ''
flag1 = 0
flag2 = 0
for i in range(len(s)):
	if s[i] == 'a':
		ans += 'a'
		if flag2 == 1:
			flag1 = 1
	elif s[i] < chr(ord(s[i]) - 1) or (flag2 == 1 and flag1 == 1):
		ans += s[i]
		if flag2 == 1:
			flag1 = 1
	else:
		ans += chr(ord(s[i]) - 1)
		flag2 = 1
if flag2 == 0:
	if s[-1] == 'a':
		ans = ans[:len(s) - 1] + 'z'
	else:
		ans = ans[:len(s) - 1] + chr(ord(s[-1]) - 1)
print(ans)


st = input()
if st == 'a':
	print('z')
else:
	apos = st.find('a')
	if apos == -1:
		answerlist = []
		for ch in st:
			newch = chr(ord(ch) - 1)
			answerlist.append(newch)
		print(''.join(answerlist))
	elif apos > 0:
		answerlist = []
		for i in range(0, apos):
			newch = chr(ord(st[i]) - 1)
			answerlist.append(newch)
		print(''.join(answerlist) + st[apos:])
	else:
		pos = 1
		while pos < len(st) and st[pos] == 'a':
			pos += 1
		if pos == len(st):
			print(st[0:len(st) - 1] + 'z')
		else:
			nextapos = st.find('a', pos + 1)
			if nextapos == -1:
				answerlist = []
				for i in range(pos, len(st)):
					newch = chr(ord(st[i]) - 1)
					answerlist.append(newch)
				print(st[0:pos] + ''.join(answerlist))
			else:
				answerlist = []
				for i in range(pos, nextapos):
					newch = chr(ord(st[i]) - 1)
					answerlist.append(newch)
				print(st[0:pos] + ''.join(answerlist) + st[nextapos:])


import string
alphabet = string.ascii_lowercase
di = {}
for i in range(len(alphabet)):
	di[alphabet[i]] = alphabet[(i - 1) % len(alphabet)]
s = input()
new_s = ''
was_a = False
ans = False
for element in s:
	if element == 'a':
		if was_a:
			ans = True
		new_s += element
		continue
	was_a = True
	if ans:
		new_s += element
	else:
		new_s += di[element]
if not was_a:
	new_s = new_s[:len(new_s) - 1] + 'z'
print(new_s)


S = input().split('a')
ma = 1000000000000
R = 'abcdefghijklmnopqrstuvwxyz'
for x in S:
	if len(x) > 0:
		ma = len(x)
		break
S1 = ''
c = 1
p = len(S)
for x in S:
	if len(x) == ma and c == 1:
		c = 0
		for i in range(len(x)):
			S1 = S1 + R[R.index(x[i]) - 1]
	else:
		S1 = S1 + x
	if p != 1:
		S1 = S1 + 'a'
		p = p - 1
if S1.count('a') == len(S1) and c == 1:
	S1 = S1[:len(S) - 2] + 'z'
print(S1)


s = str(input())
l = 0
r = 0
ac = 0
ans = ''
for i in s:
	if l == 0 and r == 0:
		if i != 'a':
			l = 1
			ans += chr(ord(i) - 1)
		else:
			ans += 'a'
			ac += 1
	elif l == 1 and r == 0:
		if i == 'a':
			r = 1
			ans += 'a'
			ac += 1
		else:
			ans += chr(ord(i) - 1)
	else:
		if i == 'a':
			ac += 1
		ans += i
if ac == len(s):
	ans = s[:len(s) - 1] + 'z'
print(ans)


a = list(input())
per = 0
if a == ['a'] * len(a):
	print('a' * (len(a) - 1) + 'z')
else:
	for i in range(len(a)):
		if a[i] == 'a':
			if per == 0:
				print('a', end='')
			else:
				print(''.join(map(str, a[i:])))
				break
		else:
			per = 1
			print(chr(ord(a[i]) - 1), end='')


s = input()
n = len(s)
k = n + 1
ss = ''
for i in range(n):
	if s[i] != 'a':
		k = i
		break
if k == n + 1:
	print(s[0:len(s) - 1], end='')
	print('z')
else:
	ss = ss + s[0:k]
	for i in range(k, n):
		if s[i] != 'a':
			ss = ss + chr(ord(s[i]) - 1)
		else:
			k = i
			ss = ss + s[k:n]
			break
	print(ss)


def sh(c):
	a = ord(c)
	return chr(a - 1)
s = str(input())
l = list(s)
x = l.count('a')
if x == 0:
	for i in range(len(l)):
		l[i] = sh(l[i])
	print(''.join(l))
elif x == len(l):
	l[-1] = 'z'
	print(''.join(l))
elif x == 1:
	a = l.index('a')
	if a == 0:
		for i in range(1, len(l)):
			if l[i] == 'a':
				break
			l[i] = sh(l[i])
		print(''.join(l))
	else:
		for i in range(a):
			l[i] = sh(l[i])
		print(''.join(l))
else:
	l1 = []
	flag1 = False
	flag2 = False
	for i in range(len(l)):
		if flag1 == True and l[i] == 'a':
			flag2 = True
		if l[i] != 'a' and flag2 == False:
			l[i] = sh(l[i])
			flag1 = True
	print(''.join(l))


s = list(input())
n = len(s)
L = 0
while L < n and s[L] == 'a':
	L += 1
R = L
while R < n and s[R] != 'a':
	R += 1
for i in range(L, R):
	if s[i] == 'a':
		s[i] = 'z'
	else:
		s[i] = chr(ord(s[i]) - 1)
if L == R == n:
	s[-1] = 'z'
print(''.join(s))


s = input()
l = 0
while l < len(s) and s[l] == 'a':
	l += 1
if l == len(s):
	print(s[:-1] + 'z')
else:
	s1 = s[:l]
	for i in range(l, len(s)):
		if s[i] == 'a':
			s1 += s[i:]
			break
		s1 += chr(ord(s[i]) - 1)
	print(s1)


s = input()
foundl = foundr = False
for x in range(0, len(s)):
	if s[x] is not 'a':
		left = x
		foundl = True
		break
if not foundl:
	c = s[0:len(s) - 1]
	c += 'z'
else:
	for x in range(left, len(s)):
		if s[x] is 'a':
			right = x
			foundr = True
			break
	c = s[:left]
	if foundr:
		for x in range(left, right):
			c += chr(ord(s[x]) - 1)
		c += s[right:]
	else:
		for x in range(left, len(s)):
			c += chr(ord(s[x]) - 1)
print(c)


s = str(input())
cnt = 0
l2 = list(s)
l = int(len(l2))
for i in s:
	if i == 'a':
		cnt += 1
if cnt == l:
	l2[l - 1] = 'z'
elif cnt == 0:
	for i in range(l):
		l2[i] = chr(ord(l2[i]) - 1)
else:
	for i in range(l):
		if l2[i] != 'a':
			l2[i] = chr(ord(l2[i]) - 1)
		else:
			loc = i
			break
	if loc == 0:
		for i in range(loc + 1, l):
			if l2[i] != 'a':
				loc2 = i
				break
		for i in range(loc2, l):
			if l2[i] != 'a':
				l2[i] = chr(ord(l2[i]) - 1)
			else:
				break
for j in l2:
	print(j, end='')


s = list(input())
dic = {}
for i in range(1, 26):
	dic[chr(i + ord('a'))] = chr(i - 1 + ord('a'))
dic['a'] = 'z'
n = len(s)
for i in range(n):
	if s[i] != 'a':
		j = i
		while j < n and s[j] != 'a':
			s[j] = dic[s[j]]
			j += 1
		break
else:
	s[-1] = dic[s[-1]]
print(''.join(s))


s = list(input())
f = False
for i in range(len(s)):
	if s[i] != 'a':
		s[i] = chr(ord(s[i]) - 1)
		f = True
	elif f:
		break
	elif i == len(s) - 1:
		s[i] = 'z'
print(''.join(s))


def shift(c):
	if c[0] == 'a':
		return 'z'
	return chr(ord(c[0]) - 1)

def main():
	s = list(input())
	n = len(s)
	found = False
	for i in range(0, n):
		if s[i] > shift(s[i]):
			for j in range(i, n):
				if s[j] >= shift(s[j]):
					s[j] = shift(s[j])
				else:
					break
			found = True
			break
	if not found:
		s[n - 1] = shift(s[n - 1])
	print(''.join(s))
main()


s = input()
n = len(s)
hea = -1
tai = -1
new = list(s)
for i in range(n):
	if new[i] != 'a':
		hea = i
		for j in range(i + 1, n):
			if new[j] == 'a':
				tai = j - 1
				break
		else:
			tai = n - 1
		for k in range(hea, tai + 1):
			temp = ord(new[k]) - 1
			new[k] = chr(temp)
		break
if hea == -1:
	new[n - 1] = 'z'
news = ''.join(new)
print(news)


def foo(s, start, end):
	if s[start] == 'a':
		return s[:start] + 'z'
	x = list(s)
	for i in range(start, end + 1):
		x[i] = chr(ord(x[i]) - 1)
	return ''.join(x)
s = input().strip()
start = 0
while start < len(s) and s[start] == 'a':
	start += 1
if start == len(s):
	start = len(s) - 1
	end = len(s) - 1
else:
	end = start + 1
	while end < len(s) and s[end] != 'a':
		end += 1
	end -= 1
print(foo(s, start, end))


s = [ord(i) for i in input()]
if s.count(97) == 0:
	for i in range(len(s)):
		s[i] -= 1
elif s.count(97) == len(s):
	s[-1] = 122
else:
	index = s.index(97)
	if index == 0:
		s.append(97)
		for i in range(len(s)):
			if s[i] != 97:
				for j in range(i, len(s)):
					if s[j] == 97:
						for k in range(i, j):
							s[k] -= 1
						break
				break
		s.pop(-1)
	else:
		hasta = 0
		for i in range(len(s)):
			if s[i] == 97:
				for j in range(i):
					s[j] -= 1
				break
for i in range(len(s)):
	s[i] = chr(s[i])
print(''.join(s))


s = input()
n = len(s)
l = 0
if s == 'a':
	print('z')
	exit()
if s.count('a') == n:
	s2 = s[:n - 1] + 'z'
	print(s2)
	exit()
while s[l] == 'a':
	l += 1
r = l
for i in range(l, n):
	if s[i] == 'a':
		l = i
		break
if l == r:
	l = len(s) + 2
for i in range(n):
	if i < l and s[i] != 'a':
		print(chr(ord(s[i]) - 1), end='')
	else:
		print(s[i], end='')


d = {'b': 'a', 'c': 'b', 'd': 'c', 'e': 'd', 'f': 'e', 'g': 'f', 'h': 'g', 'i': 'h', 'j': 'i', 'k': 'j', 'l': 'k', 'm': 'l', 'n': 'm', 'o': 'n', 'p': 'o', 'q': 'p', 'r': 'q', 's': 'r', 't': 's', 'u': 't', 'v': 'u', 'w': 'v', 'x': 'w', 'y': 'x', 'z': 'y'}
s = list(input())
fl = False
for (i, v) in enumerate(s):
	if v in d:
		fl = True
		s[i] = d[v]
	elif fl:
		break
d['a'] = 'z'
if not fl:
	s[-1] = d[s[-1]]
print(''.join(s))


import re
try:
	while True:
		s = input()
		m = re.search('[^a]', s)
		if m is None:
			print(s[:-1], end='z\n')
		else:
			j = s.find('a', m.end())
			if j == -1:
				j = len(s)
			print(end=s[:m.start()])
			for i in range(m.start(), j):
				print(end=chr((ord(s[i]) - 98) % 26 + 97))
			print(s[j:])
except EOFError:
	pass


s = input().strip()
start = 0
end = len(s) - 1
length = 0
for i in range(len(s)):
	if s[i] == 'a' and length > 0:
		end = i - 1
		break
	elif s[i] == 'a' and length == 0:
		pass
	else:
		length += 1
if length > 0:
	start = end - length + 1
	s = list(s)
	for i in range(start, end + 1):
		s[i] = chr(ord(s[i]) - 1)
	print(''.join(s))
else:
	s = list(s)
	s[-1] = 'z'
	print(''.join(s))


import sys
fin = sys.stdin
fout = sys.stdout
s = fin.readline().strip()
res = [0] * len(s)
start = -1
end = len(s)
for i in range(len(s)):
	if s[i] == 'a':
		if start == -1:
			continue
		else:
			end = i - 1
			break
	elif start == -1:
		start = i
else:
	end = len(s) - 1
for i in range(len(s)):
	res[i] = s[i]
if start == -1:
	res[-1] = 'z'
else:
	for i in range(start, end + 1):
		res[i] = chr(ord(s[i]) - 1)
fout.write(''.join(res))


s = input()
cnt = 0
for i in range(len(s)):
	if s[i] == 'a':
		cnt += 1
	else:
		break
if cnt == len(s):
	for i in range(len(s) - 1):
		print('a', end='')
	print('z')
	exit(0)
if s[0] == 'a':
	k = 1000000
	j = -1
	for i in range(len(s)):
		if s[i] != 'a':
			j = i
			break
		print(s[i], end='')
	for i in range(j, len(s)):
		if s[i] == 'a':
			k = i
			break
		print(chr(ord(s[i]) - 1), end='')
	for i in range(k, len(s)):
		print(s[i], end='')
else:
	k = 1000000
	for i in range(len(s)):
		if s[i] == 'a':
			k = i
			break
		print(chr(ord(s[i]) - 1), end='')
	for i in range(k, len(s)):
		print(s[i], end='')


word = input()
result = str()
check = 0
for i in range(len(word)):
	if check == 2:
		result += word[i]
	if check == 1:
		if word[i] == 'a':
			result = result + 'a'
			check = 2
		else:
			result = result + str(chr(ord(word[i]) - 1))
	if check == 0:
		if word[i] == 'a':
			result = result + 'a'
		else:
			check = 1
			result = result + str(chr(ord(word[i]) - 1))
if check == 0:
	result = word[:-1] + 'z'
print(result)


s = input()
n = len(s)
p = list(s)
i = 0
while s[i] == 'a':
	i += 1
	if i == n:
		p[n - 1] = 'z'
		s = ''.join(p)
		print(s)
		return
while s[i] != 'a':
	p[i] = chr(ord(s[i]) - 1)
	i += 1
	if i == n:
		break
s = ''.join(p)
print(s)


s = input()
full = 0
started = 0
ans = ''
for l in s:
	if l != 'a' and full == 0:
		ans += chr(ord(l) - 1)
		started = 1
	else:
		if l == 'a' and started == 1:
			full = 1
		ans += l
if ans != s:
	print(ans)
else:
	print(s[:-1] + 'z')


a = input()
s = ''
t = 0
for i in a:
	if i != 'a' and t != -1:
		s += chr(ord(i) - 1)
		t += 1
	else:
		s += i
		if t > 0:
			t = -1
if t == 0:
	s = s[:-1] + 'z'
print(s)


word_original = input()
word = word_original.lstrip('a')
if not word:
	print('a' * (len(word_original) - len(word) - 1) + 'z')
	exit()
word_bytes = word.encode(encoding='UTF-8')
index_of_a = word.find('a')
print('a' * (len(word_original) - len(word)), end='')
if index_of_a == -1:
	print(''.join((chr(char - 1) for char in word_bytes)))
else:
	print(''.join((chr(char - 1) for char in word_bytes[:index_of_a])) + word[index_of_a:])


from collections import defaultdict
import sys, os, math
s = input()
ss = 'abcdefghijklmnopqrstuvwxyz'
sss = ''
if s[0] != 'a':
	for i in range(len(s)):
		if s[i] == 'a':
			sss += s[i:]
			break
		sss += ss[ord(s[i]) - ord('a') - 1]
else:
	pos = 0
	while pos < len(s) and s[pos] == 'a':
		pos += 1
	if pos == len(s):
		for i in range(len(s) - 1):
			sss += 'a'
		print(sss + 'z')
		sys.exit(0)
	sss += s[:pos]
	for i in range(pos, len(s)):
		if s[i] == 'a':
			sss += s[i:]
			break
		sss += ss[ord(s[i]) - ord('a') - 1]
print(sss)


s = str(input())
n = len(s)
i = 0
A = 'abcdefghijklmnopqrstuvwxyz'
while i < n and s[i] == 'a':
	i += 1
if i == n:
	print(s[:n - 1] + 'z')
else:
	d = i
	while i < n and s[i] != 'a':
		i += 1
	r = ''
	for j in range(d, i):
		if s[j] == 'a':
			r += 'z'
		else:
			r += A[A.index(s[j]) - 1]
	print(s[:d] + r + s[i:])


def lexi_sum(s):
	a = 'abcdefghijklmnopqrstuvwxyz'
	t = 0
	for l in s:
		t += a.index(l) + 1
	return t

def shift(s):
	a = 'abcdefghijklmnopqrstuvwxyz'
	s1 = ''
	for l in s:
		s1 += a[a.index(l) - 1]
	return s1
s = input()
if set(s) == set('a'):
	print(s[:-1] + 'z')
	quit()
s = s.split('a')
m = s[0]
k = 1
while len(m) < 1:
	m = s[k]
	k += 1
m1 = s.index(m)
s[m1] = shift(m)
print('a'.join(s))


import sys
a = list(input())
b = ''
l = 0
o = 0
for x in range(len(a)):
	if a[x] == 'a' and l == 1:
		break
	elif a[x] != 'a':
		a[x] = chr(ord(a[x]) - 1)
		l = 1
		o = 1
if o == 0:
	a[len(a) - 1] = 'z'
print(''.join(a))


A = 'zabcdefghijklmnopqrstuvwxyz'
shifted = dict(zip(A[1:], A))
s = input()
(n, i) = (len(s), 0)
while i < n - 1 and s[i] == 'a':
	i += 1
j = i + 1
if j < n:
	while s[j] != 'a':
		j += 1
		if j == n:
			break
print(s[:i] + ''.join((shifted[ch] for ch in s[i:j])) + s[j:])


IL = lambda : list(map(int, input().split()))
I = lambda : int(input())
s = list(map(ord, input()))
if s.count(97) == len(s):
	print('a' * (len(s) - 1) + 'z')
	quit()
started = False
for (i, ss) in enumerate(s):
	if ss > 97:
		started = True
	if started:
		if ss > 97:
			s[i] -= 1
		else:
			break
print(''.join(map(chr, s)))


s = input()
fna = -1
for i in range(0, len(s)):
	if s[i] != 'a':
		fna = i
		break
if fna == -1:
	print(s[0:len(s) - 1] + 'z')
	exit(0)
fa = -1
for i in range(fna + 1, len(s)):
	if s[i] == 'a':
		fa = i
		break
if fa == -1:
	fa = len(s)
ostr = list(s)
for i in range(fna, fa):
	ostr[i] = chr(ord(ostr[i]) - 1)
print(''.join(ostr))


s = input()
i = 0
ans = ''
check = True
while i < len(s) and s[i] == 'a':
	ans += s[i]
	i += 1
while i < len(s) and s[i] != 'a':
	ans += chr(ord(s[i]) - 1)
	check = False
	i += 1
ans += s[i:]
if check:
	ans = ans[:len(ans) - 1] + 'z'
print(ans)


a = input()
a = 'a' + a + 'a'
a = list(a)
b = []
for i in range(len(a)):
	if a[i] == 'a':
		b.append(i)
e = 0
for i in range(len(b) - 1):
	if b[i] + 1 != b[i + 1]:
		e = 1
		f = b[i]
		g = b[i + 1]
		break
if e == 0:
	a[-2] = 'z'
	print(''.join(a[1:-1]))
else:
	for i in range(f + 1, g):
		a[i] = chr(ord(a[i]) - 1)
	print(''.join(a[1:-1]))


s = input()
tam = len(s)
v = []
i = 0
flag = False
while i <= tam - 1:
	if s[i] != 'a' and flag == False:
		flag = True
		while i < tam and s[i] != 'a':
			v.append(ord(s[i]) - 98)
			i += 1
	if i > tam - 1:
		break
	v.append(ord(s[i]) - 97)
	i += 1
if flag == False:
	v[tam - 1] = 25
for i in range(tam):
	print(chr(v[i] + 97), end='')
print()


import re
line = input()
s = re.findall('[^a]+', line)
res = []
if len(s):
	for i in s[0]:
		res.append(chr(ord(i) - 1))
	print(line.replace(s[0], ''.join(res), 1))
else:
	print(line[:-1], 'z', sep='')


s = input()
k = 0
while k < len(s) - 1 and s[k] == 'a':
	k += 1
c = k
while c < len(s) and s[c] != 'a':
	c += 1
if k == len(s) - 1:
	print(s[:-1], end='')
	if s[-1] == 'a':
		print('z', end='')
	else:
		print(chr(ord(s[-1]) - 1), end='')
else:
	for i in range(len(s)):
		if k <= i and i < c:
			if s[i] == 'a':
				print('z', end='')
			else:
				print(chr(ord(s[i]) - 1), end='')
		else:
			print(s[i], end='')


a = list(input())
b = []
l = len(a)
count = 0
c = []
if a[0] != 'a':
	for i in range(l):
		if a[i] != 'a':
			b.append(chr(ord(a[i]) - 1))
		else:
			break
	if a[i] == 'a':
		b += a[i:]
	print(''.join(b))
elif a.count('a') != l:
	for i in range(l):
		if a[i] != 'a':
			b.append(chr(ord(a[i]) - 1))
			count = 1
			c.append(i)
		if count == 1 and a[i] == 'a':
			break
	a[c[0]:c[-1] + 1] = b
	print(''.join(a))
else:
	print('a' * (l - 1) + 'z')


s = input()
n = len(s)
x = s.count('a')
f = -1
t = 3
if x == 0:
	s = list(s)
	for i in range(n):
		m = ord(s[i])
		s[i] = chr(m - 1)
	for i in s:
		print(i, end='')
elif x == n:
	s = list(s)
	s[n - 1] = 'z'
	for i in s:
		print(i, end='')
elif s[0] == 'a':
	s = list(s)
	for i in range(1, n):
		if s[i] != 'a':
			m = ord(s[i])
			s[i] = chr(m - 1)
			f = 0
		elif f == 0:
			break
		elif f != 0:
			continue
	for i in s:
		print(i, end='')
else:
	s = list(s)
	for i in range(0, n):
		if s[i] != 'a':
			m = ord(s[i])
			s[i] = chr(m - 1)
			f = 0
		elif f == 0:
			break
		elif f != 0:
			continue
	for i in s:
		print(i, end='')


st = input()
st1 = ''
others = False
length = len(st)
for i in range(0, length):
	if i == length - 1 and others is False:
		st1 += str(chr((ord(st[i]) - 98) % 26 + 97))
		break
	if st[i] == 'a':
		if others is True:
			st1 += st[i:length]
			break
		st1 += str(st[i])
	else:
		others = True
		st1 += str(chr(ord(st[i]) - 1))
print(st1)


import io, os
import sys
from atexit import register
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
sys.stdout = io.BytesIO()
register(lambda : os.write(1, sys.stdout.getvalue()))
tokens = []
tokens_next = 0

def nextStr():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = input().split()
		tokens_next = 0
	tokens_next += 1
	if type(tokens[tokens_next - 1]) == str:
		return tokens[tokens_next - 1]
	return tokens[tokens_next - 1].decode()

def nextInt():
	return int(nextStr())

def nextIntArr(n):
	return [nextInt() for i in range(n)]

def print(s, end='\n'):
	sys.stdout.write((str(s) + end).encode())

def shift(c):
	if c == 'a':
		return 'z'
	res = ord(c) - 1
	return chr(res)
s = nextStr()
nonA = next((i for i in range(len(s)) if s[i] != 'a'), len(s))
if nonA == len(s):
	print(s[:-1] + shift(s[-1]))
	exit(0)
nextA = next((i for i in range(nonA, len(s)) if s[i] == 'a'), len(s))
print(s[:nonA] + ''.join((shift(c) for c in s[nonA:nextA])) + s[nextA:])


a = [*input()]
n = len(a)
i = 0
while i < n and a[i] == 'a':
	i += 1
if i == n:
	a[-1] = 'z'
while i < n and a[i] != 'a':
	a[i] = chr(ord(a[i]) - 1)
	i += 1
print(''.join(a))


s = list(input().strip())
ended = False
started = False
for i in range(len(s)):
	c = s[i]
	if not ended and c != 'a':
		s[i] = chr(ord(c) - 1)
		started = True
	elif started:
		ended = True
if not started:
	s[-1] = 'z'
print(''.join(s))


from collections import deque as de
import math
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))
s = input()
if len(set(s)) == 1 and s[0] == 'a':
	print('a' * (len(s) - 1) + 'z')
else:
	aa = 0
	st = 0
	fn = 0
	cntt = 0
	for i in range(len(s)):
		if cntt == 0:
			if aa == 0 and s[i] != 'a':
				aa = 1
				st = i
			if aa == 1 and s[i] == 'a':
				aa = 0
				fn = i - 1
				cntt = 1
	if aa == 1:
		fn = len(s) - 1
	ans = ''
	for i in range(len(s)):
		if st <= i <= fn:
			kk = ord(s[i])
			ans += chr(kk - 1)
		else:
			ans += s[i]
	print(ans)


def printer(x, s):
	for j in range(0, 26):
		if s[i] == x[j]:
			print(x[j - 1], end='')
			break
		else:
			continue
s = input()
z = 0
w = 0
zz = 0
yy = 0
x = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for j in range(0, len(s)):
	if s[j] == 'a':
		yy += 1
	else:
		break
if yy == len(s):
	for j in range(0, len(s) - 1):
		print(s[j], end='')
	print('z')
else:
	for i in range(0, len(s)):
		if w == 0:
			if z == 0:
				if s[i] == 'a':
					print(s[i], end='')
					if zz == 1:
						z = 1
					else:
						z = 0
				else:
					zz = 1
					printer(x, s)
			elif s[i] == 'a':
				print(s[i], end='')
			elif zz == 1:
				print(s[i], end='')
			else:
				w = 1
				zz = 1
				printer(x, s)
		else:
			print(s[i], end='')


s1 = input()
s = list(s1)
start = -1
end = -1
for i in range(len(s)):
	if s[i] > 'a' and start == -1:
		start = i
	elif s[i] == 'a' and start != -1:
		end = i
		break
if end == -1:
	end = len(s)
if start == -1:
	s[len(s) - 1] = 'z'
else:
	for i in range(start, end):
		p = ord(s[i]) - 1
		s[i] = chr(p)
s1 = ''.join(s)
print(s1)


alth = 'abcdefghijklmnopqrstuvwxyz'
s = list(input())
n = len(s)
i = 0
while n > i and s[i] == 'a':
	i += 1
temp = 0
while n > i and s[i] != 'a':
	s[i] = alth[alth.find(s[i]) - 1]
	temp = 1
	i += 1
if temp == 0:
	s[n - 1] = 'z'
print(''.join(s))


s = input()
if len(s) == s.count('a'):
	r = s[:-1]
	r += 'z'
	print(r)
else:
	b = 0
	for i in range(len(s)):
		if s[i] != 'a':
			b = i
			break
	r = ''
	r += s[:b]
	for i in range(b, len(s)):
		if s[i] == 'a':
			y = 'z'
		else:
			x = ord(s[i])
			y = chr(x - 1)
		if y > s[i]:
			r += s[i:]
			break
		else:
			r += y
	print(r)


def dowhatever(s, si, ei):
	r = s[:si - 1]
	if si > ei:
		r += 'z'
	else:
		r = s[:si]
		for i in range(si, ei + 1):
			r += chr(ord(s[i]) - 1)
		r += s[ei + 1:]
	print(r)
s = input()
n = len(s)
i = 0
while i < n and s[i] == 'a':
	i += 1
si = i
while i < n and s[i] != 'a':
	i += 1
ei = i - 1
dowhatever(s, si, ei)


s = list(input())
alph = 'abcdefghijklmnopqrstuvwxyz'
tg = False
for i in range(len(s)):
	if s[i] == 'a':
		if tg:
			break
	else:
		tg = True
		s[i] = alph[alph.index(s[i]) - 1]
if not tg:
	s[-1] = 'z'
print(''.join(s))


x = input()
y = list(x)
i = 0
d = -1
for c in x:
	if c == 'a':
		if d != -1:
			break
		i += 1
		continue
	if d == -1:
		d = i
	y[i] = chr(ord(y[i]) - 1)
	i += 1
if d == -1:
	y[-1] = 'z'
print(''.join(y))


s = list(input())
if len(set(s)) == 1 and s[0] == 'a':
	s[-1] = 'z'
	print(''.join(map(str, s)))
else:
	k = 0
	add = []
	for x in s:
		if x == 'a':
			add.append('a')
		else:
			break
	s = s[len(add):]
	for x in s:
		if x != 'a':
			k += 1
		else:
			break
	t = []
	for x in s[:k]:
		t.append(chr(ord(x) - 1))
	s[:k] = t
	s = add + s
	print(''.join(map(str, s)))


ori_str = input()
res = ''
n = len(ori_str)
for i in range(n):
	if ori_str[i] != 'a':
		break
	elif i == n - 1:
		res = res + 'z'
	else:
		res = res + 'a'
for i in range(len(res), n):
	if ori_str[i] == 'a':
		res = res + ori_str[i:]
		break
	else:
		res = res + chr(ord(ori_str[i]) - 1)
print(res)


import sys
slowo = input()
slowo = slowo + 'a'
ret = ''
i = 0
while slowo[i] == 'a' and len(slowo) > i + 1:
	i += 1
	ret += 'a'
if i + 1 == len(slowo):
	w = slowo[0:len(slowo) - 2] + 'z'
	print(w)
	return
while slowo[i] != 'a' and len(slowo) > i:
	ret = ret + chr(ord(slowo[i]) - 1)
	i += 1
ret = ret + slowo[i:len(slowo) - 1]
print(ret)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans
string = input()
n = len(string)
li = []
(start, end, flag) = (-1, n, 1)
for i in range(n):
	li.append(string[i])
	if li[-1] == 'a' and flag == 1:
		if i == start + 1:
			start = i
		else:
			flag = 0
			end = i
if start == n - 1:
	li[-1] = 'z'
else:
	for i in range(start + 1, end):
		li[i] = chr(ord(li[i]) - 1)
for i in range(n):
	print(li[i], end='')
print('')


s = input()
n = len(s)
L = list(s)
y = 0
for c in s:
	if c != 'a' or y == n - 1:
		break
	y += 1
i = ord(L[y])
if i == ord('a'):
	i = ord('z')
else:
	i -= 1
L[y] = chr(i)
x = y + 1
for j in range(x, n):
	if L[j] == 'a':
		break
	else:
		i = ord(L[j])
		if i == ord('a'):
			i = ord('z')
		else:
			i -= 1
		L[j] = chr(i)
	y += 1
w = ''.join(L)
print(w)


s = input()
c_i = None
c_i_e = len(s)
for i in range(len(s)):
	if s[i] != 'a':
		if c_i == None:
			c_i = i
	elif c_i != None:
		c_i_e = i
		break
if c_i == None:
	print(s[0:len(s) - 1], end='')
	print('z')
else:
	print(s[0:c_i], end='')
	for i in range(c_i, c_i_e):
		if s[i] == 'a':
			print('z', end='')
		else:
			print(chr(ord(s[i]) - 1), end='')
	print(s[c_i_e:])


s = list(input())
n = len(s)
if s.count('a') == 0:
	for i in range(n):
		s[i] = chr(ord(s[i]) - 1)
	print(''.join(s))
elif s.count('a') == n:
	s[-1] = 'z'
	print(''.join(s))
else:
	(st, en) = (-1, n)
	for i in range(n):
		if s[i] == 'a':
			if i == st + 1:
				st = i
			else:
				en = i
				break
	for i in range(st + 1, en):
		s[i] = chr(ord(s[i]) - 1)
	print(''.join(s))


import os
import sys
from io import BytesIO, IOBase

def main():
	a = input()
	fl = False
	n = len(a)
	for i in range(n):
		if a[i] == 'a':
			if fl:
				break
			else:
				continue
		fl = True
		a = a[:i] + chr(ord(a[i]) - 1) + a[i + 1:]
	if not fl:
		a = a[:-1] + 'z'
	print(a)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


s = input()
n = len(s)
l = []
if s.count('a') == 0:
	for i in s:
		l.append(chr(ord(i) - 1))
	for i in l:
		print(i, end='')
elif s.count('a') == n:
	print('a' * (n - 1) + 'z')
else:
	strt = 0
	last = 0
	for i in range(n):
		if s[i] != 'a':
			strt = i
			break
	flag = 0
	for i in range(strt + 1, n):
		if s[i] == 'a':
			last = i
			flag = 1
			break
	if flag == 0:
		last = n
	res = ''
	for i in range(n):
		if i >= strt and i < last:
			res = res + chr(ord(s[i]) - 1)
		else:
			res = res + s[i]
	print(res)


s = list(input() + 'a')
if s == ['a'] * len(s):
	print('a' * (len(s) - 2) + 'z')
	exit()
for i in range(len(s)):
	if s[i] != 'a':
		break
for j in range(i + 1, len(s)):
	if s[j] == 'a':
		break
for k in range(i, j):
	s[k] = chr(ord(s[k]) - 1)
print(''.join(s)[:-1])


n = input()
i = 0
while i < len(n):
	if n[i] == 'a':
		i += 1
	else:
		break
if i == len(n):
	print(n[:i - 1] + 'z')
else:
	j = i
	while j < len(n):
		if n[j] != 'a':
			j += 1
		else:
			break
	s = n[:i]
	for z in range(i, j):
		s = s + chr(ord(n[z]) - 1)
	s = s + n[j:]
	print(s)


import string
s = input()
arr = list(string.ascii_lowercase)
val = len(s)
for (x, i) in enumerate(s):
	if i != 'a':
		val = x
		break
i = val
while i < len(s) and s[i] != 'a':
	i += 1
start = val
end = i
s = list(s)
f = False
for i in range(start, end):
	f = True
	s[i] = arr[ord(s[i]) - ord('a') - 1]
if f:
	print(''.join(s))
else:
	s[-1] = arr[ord(s[-1]) - ord('a') - 1]
	print(''.join(s))


q = 'abcdefghijklmnopqrstuvwxyz'
w = dict()
for i in range(26):
	w[q[i]] = q[i - 1]
s = input()
l = 0
if s == 'a' * len(s):
	print('a' * (len(s) - 1) + 'z')
else:
	while s[l] == 'a':
		l += 1
	r = l + 1
	while r < len(s) and s[r] != 'a':
		r += 1
	print(s[:l], end='')
	for i in range(l, r):
		print(w[s[i]], end='')
	print(s[r:], end='')
	print()


def change(c):
	if c == 'a':
		return 'z'
	else:
		return chr(ord(c) - 1)
s = list(input())
L = len(s)
flag = False
for i in range(L - 1):
	if s[i] != 'a':
		flag = True
		while i < L:
			if s[i] == 'a':
				break
			s[i] = change(s[i])
			i = i + 1
		break
if not flag:
	s[L - 1] = change(s[L - 1])
print(''.join(s))


import sys
from decimal import *

def main():
	s = sys.stdin.readline().rstrip()
	x = []
	step = 0
	for i in range(len(s)):
		c = s[i]
		if step == 0:
			if c == 'a':
				x.append(c)
			else:
				step = 1
				x.append(chr(ord(c) - 1))
		elif step == 1:
			if c == 'a':
				step = 2
				x.append(c)
			else:
				x.append(chr(ord(c) - 1))
		else:
			x.append(c)
	if step == 0:
		x[-1] = 'z'
	print(''.join(x))
main()


def fun(st):
	li = []
	le = len(st)
	if le == 1 and st[0] == 'a':
		return 'z'
	x = 0
	i = 0
	y = 0
	a_count = 0
	for j in range(le):
		if st[j] == 'a':
			a_count += 1
	if a_count == le:
		lis = ['a'] * le
		lis[le - 1] = 'z'
		return ''.join([str(elem) for elem in lis])
	while i < le:
		if st[i] == 'a':
			li.append(st[i])
			if i != 0 and y != 0:
				i += 1
				break
		else:
			li.append(chr(ord(st[i]) - 1))
			if i < le - 1 and st[i] != st[i + 1]:
				y += 1
		i += 1
	if i != le:
		while i < le:
			li.append(st[i])
			i += 1
	return ''.join([str(elem) for elem in li])
st = input()
print(fun(st))


s = input()
string = s
xd = ''
for c in range(0, len(s)):
	if s[c] is not 'a':
		i = c
		break
	else:
		i = len(s)
		if c != len(s) - 1:
			xd += 'a'
		else:
			xd += 'z'
if i != len(s):
	for c in range(i, len(s)):
		if s[c] is not 'a':
			xd += chr(ord(s[c]) - 1)
			z = len(s)
		else:
			z = c
			break
	xd += s[z:]
print(xd)


s = input()

def solve(s):
	for (start_idx, ch) in enumerate(s):
		if ch != 'a':
			break
	else:
		return s[:-1] + 'z'
	for (end_idx, ch) in zip(range(start_idx + 1, len(s)), s[start_idx + 1:]):
		if ch == 'a':
			break
	else:
		end_idx = len(s)
	tr = str.maketrans(''.join([chr(ord('a') + i) for i in range(26)]), ''.join([chr(ord('a') + (i + 25) % 26) for i in range(26)]))
	result = s[:start_idx] + s[start_idx:end_idx].translate(tr) + s[end_idx:]
	return result
print(solve(s))


from collections import defaultdict
import sys
import math

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def minput():
	return map(int, input().split())

def listinput():
	return list(map(int, input().split()))
s = list(map(str, input()))
i = 0
while i < len(s) and s[i] == 'a':
	i += 1
if i == len(s):
	print(''.join(s)[:-1] + 'z')
else:
	while i < len(s) and s[i] != 'a':
		s[i] = chr(ord(s[i]) - 1)
		i += 1
	print(''.join(s))


s = input()
i = 0
b = False
while i < len(s) and s[i] == 'a':
	i += 1
while i < len(s) and s[i] != 'a':
	s = s[:i] + chr(ord(s[i]) - 1) + s[i + 1:]
	i += 1
	b = True
print(s if b else 'a' * (len(s) - 1) + 'z')


string = input()
start = False
finish = False
result = ''
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in range(len(string)):
	if not start:
		if string[i] != 'a':
			result += alphabet[alphabet.find(string[i]) - 1]
			start = True
		else:
			result += 'a'
	elif not finish:
		if string[i] == 'a':
			result += 'a'
			finish = True
		else:
			result += alphabet[alphabet.find(string[i]) - 1]
	else:
		result += string[i]
if result == string:
	print(string[:-1] + 'z')
else:
	print(result)


st = list(input())
i = 0
used = False
while i < len(st):
	if st[i] == 'a' and used:
		break
	elif st[i] != 'a':
		st[i] = chr(ord(st[i]) - 1)
		used = True
	i += 1
if not used:
	st[-1] = 'z'
print(''.join(st))


s = input()
ans = ''
a = 1
i = 0
while i < len(s):
	if s[i] != 'a':
		while i < len(s) and s[i] != 'a':
			ans += chr(ord(s[i]) - 1)
			i += 1
		while i < len(s):
			ans += s[i]
			i += 1
		break
	elif i == len(s) - 1:
		ans += 'z'
		i += 1
	else:
		ans += 'a'
		i += 1
print(ans)