# 1
chr_count = 0
chr_num = 0
for _ in text:
if text[chr_num] == "!":
chr_count += 1
text = text[:chr_num] + text[chr_num+1:]
continue
chr_num += 1
print("Номер 1")
print(text)
print(chr_count)
# 2
for i in text:
if text[chr_num] == "а":
text = text[:chr_num+1] + "бвгд" + text[chr_num+1:]
chr_num += 4
print("\nНомер 2")
# 3
new_text = text
for num in range(1, len(text)+1):
new_text += text[-num]
text = new_text
print("\nНомер 3")
# 4
new_text = ""
for num in range(len(text)):
if num % 2 == 0:
new_text += text[num]
print("\nНомер 4")
string=input()
count=string.count("!")
string=string.replace("!","")
print(string, count)
string=string.replace("а","абвгд")
print(string)
string=string+string[::-1]
string=[string[i] for i in range(len(string)) if i%2==0]
print("".join(string))
# 1
chr_count = 0
chr_num = 0
for _ in text:
if text[chr_num] == "!":
chr_count += 1
text = text[:chr_num] + text[chr_num+1:]
continue
chr_num += 1
print("Номер 1")
print(text)
print(chr_count)
# 2
chr_num = 0
for i in text:
if text[chr_num] == "а":
text = text[:chr_num+1] + "бвгд" + text[chr_num+1:]
chr_num += 4
chr_num += 1
print("\nНомер 2")
print(text)
# 3
new_text = text
for num in range(1, len(text)+1):
new_text += text[-num]
text = new_text
print("\nНомер 3")
print(text)
# 4
new_text = ""
for num in range(len(text)):
if num % 2 == 0:
new_text += text[num]
text = new_text
print("\nНомер 4")
print(text)
string=input()
count=string.count("!")
string=string.replace("!","")
print(string, count)
string=string.replace("а","абвгд")
print(string)
string=string+string[::-1]
print(string)
string=[string[i] for i in range(len(string)) if i%2==0]
print("".join(string))