fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let k: usize = s.trim().parse().unwrap(); let mut v = [vec!["A", "E"], vec!["B"], vec!["C"], vec!["D"]]; for i in 0..k { let c = v[i % 4].remove(0); v[(i + 1) % 4].push(c); } (0..4).for_each(|i| println!("{}", v[i].join(""))) }