print("Я меняю раскладку \nт.е если вы случайно введете ghbdtn вместо привет я заменю ваш текст на привет\n")


en_rask = "qQwWeErRtTyYuUiIoOpP[}{]aASsdDfFgGhHjJkKlL;:'\"zZxXcCvVbBnNmM@#$^&,<.>/?"
ru_rask = "йЙцЦуУкКеЕнНгГшШщЩзЗхЪХъфФЫывВаАпПрРоОлЛдДжЖэЭяЯчЧсСмМиИтТ\"№;:?*ьЬбБюЮ.,"
while True:	
	text = input("Введите что изменить\nНапишите навыход чтобы выйти")
	if text == "навыход":
		break
	if text[0] in en_rask and text[-2] in en_rask:
		text = text.replace("q","й")
		text = text.replace("@","\"")
		text = text.replace("#","№")
		text = text.replace("$",";")
		text = text.replace("^",":")
		text = text.replace("&","?")
		text = text.replace("w","ц")
		text = text.replace("e","у")
		text = text.replace("r","к")
		text = text.replace("t","е")
		text = text.replace("y","н")
		text = text.replace("u","г")
		text = text.replace("i","ш")
		text = text.replace("o","щ")
		text = text.replace("p","з")
		text = text.replace("[","х")
		text = text.replace("]","ъ")
		text = text.replace("a","ф")
		text = text.replace("s","ы")
		text = text.replace("d","в")
		text = text.replace("f","а")
		text = text.replace("g","п")
		text = text.replace("h","р")
		text = text.replace("j","о")
		text = text.replace("k","л")
		text = text.replace("l","д")
		text = text.replace(";","ж")
		text = text.replace("'","э")
		text = text.replace("z","я")
		text = text.replace("x","ч")
		text = text.replace("c","с")
		text = text.replace("v","м")
		text = text.replace("b","и")
		text = text.replace("n","т")
		text = text.replace("m","ь")
		text = text.replace(",","б")
		text = text.replace(".","ю")
		text = text.replace("/",".")
		text = text.replace("Q","Й")
		text = text.replace("W","Ц")
		text = text.replace("E","У")
		text = text.replace("R","К")
		text = text.replace("T","Е")
		text = text.replace("Y","Н")
		text = text.replace("U","Г")
		text = text.replace("I","Ш")
		text = text.replace("O","Щ")
		text = text.replace("P","З")
		text = text.replace("{","Х")
		text = text.replace("}","Ъ")
		text = text.replace("A","Ф")
		text = text.replace("S","Ы")
		text = text.replace("D","В")
		text = text.replace("F","А")
		text = text.replace("G","П")
		text = text.replace("H","Р")
		text = text.replace("J","О")
		text = text.replace("K","Л")
		text = text.replace("L","Д")
		text = text.replace(":","Ж")
		text = text.replace("\"","Э")
		text = text.replace("Z","Я")
		text = text.replace("X","Ч")
		text = text.replace("C","С")
		text = text.replace("V","М")
		text = text.replace("B","И")
		text = text.replace("N","Т")
		text = text.replace("M","Ь")
		text = text.replace("<","Б")
		text = text.replace(">","Ю")
		text = text.replace("?",",")
		print(text)
	elif text[0] in ru_rask or text[-2] in ru_rask:
		text = text.replace("\"","@")
		text = text.replace("№","#")
		text = text.replace(";","$")
		text = text.replace(":","^")
		text = text.replace("?","&")
		text = text.replace("й","q")
		text = text.replace("ц","w")
		text = text.replace("у","e")
		text = text.replace("к","r")
		text = text.replace("е","t")
		text = text.replace("н","y")
		text = text.replace("г","u")
		text = text.replace("ш","i")
		text = text.replace("щ","o")
		text = text.replace("з","p")
		text = text.replace("х","[")
		text = text.replace("ъ","]")
		text = text.replace("ф","a")
		text = text.replace("ы","s")
		text = text.replace("в","d")
		text = text.replace("а","f")
		text = text.replace("п","g")
		text = text.replace("р","h")
		text = text.replace("о","j")
		text = text.replace("л","k")
		text = text.replace("д","l")
		text = text.replace("ж",";")
		text = text.replace("э","'")
		text = text.replace("я","z")
		text = text.replace("ч","x")
		text = text.replace("с","c")
		text = text.replace("м","v")
		text = text.replace("и","b")
		text = text.replace("т","n")
		text = text.replace("ь","m")
		text = text.replace("б",",")
		text = text.replace("ю",".")
		text = text.replace(".","/")
		text = text.replace("Й","Q")
		text = text.replace("Ц","W")
		text = text.replace("У","E")
		text = text.replace("К","R")
		text = text.replace("Е","T")
		text = text.replace("Н","Y")
		text = text.replace("Г","U")
		text = text.replace("Ш","I")
		text = text.replace("Щ","O")
		text = text.replace("З","P")
		text = text.replace("Х","{")
		text = text.replace("Ъ","}")
		text = text.replace("Ф","A")
		text = text.replace("Ы","S")
		text = text.replace("В","D")
		text = text.replace("А","F")
		text = text.replace("П","G")
		text = text.replace("Р","H")
		text = text.replace("О","J")
		text = text.replace("Л","K")
		text = text.replace("Д","L")
		text = text.replace("Ж",":")
		text = text.replace("Э","\"")
		text = text.replace("Я","Z")
		text = text.replace("Ч","X")
		text = text.replace("С","C")
		text = text.replace("М","V")
		text = text.replace("И","B")
		text = text.replace("Т","N")
		text = text.replace("Ь","M")
		text = text.replace("Б","<")
		text = text.replace("Ю",">")
		text = text.replace(",","?")
		print(text)