use std::str::FromStr; const DX: [i32; 8] = [0, 1, 0, -1, 1, 1, -1, -1]; const DY: [i32; 8] = [1, 0, -1, 0, 1, -1, -1, 1]; fn main() { let (r, w) = (std::io::stdin(), std::io::stdout()); let mut sc = IO::new(r.lock(), w.lock()); let s = sc.chars(); let mut t = vec![]; for (i, x) in s.iter().enumerate() { let code = (*x as u8) - ('A' as u8); let norm = (((code as i64 - (i as i64 + 1)) % 26 + 26) % 26) as u8; t.push(char::from('A' as u8 + norm)); } println!("{}", t.iter().map(char::to_string).collect::>().join("")); } pub struct IO(R, std::io::BufWriter); impl IO { pub fn new(r: R, w: W) -> Self { Self(r, std::io::BufWriter::new(w)) } pub fn write(&mut self, s: S) { use std::io::Write; self.1.write_all(s.to_string().as_bytes()).unwrap(); } pub fn read(&mut self) -> T { use std::io::Read; let buf = self.0.by_ref().bytes() .map(|b| b.unwrap()) .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t') .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t') .collect::>(); unsafe { std::str::from_utf8_unchecked(&buf) }.parse().ok().expect("Parse error.") } pub fn chars(&mut self) -> Vec { self.read::().chars().collect() } pub fn usize0(&mut self) -> usize { self.read::() - 1 } pub fn vec(&mut self, n: usize) -> Vec { (0..n).map(|_| self.read()).collect() } }