fn main() { let mut xx = String::new(); std::io::stdin().read_line(&mut xx).ok(); let xx: Vec = xx.split_whitespace().flat_map(str::parse).collect(); let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let mut s: Vec = s.trim().chars().collect(); for i in 0..=(xx[0] - xx[1]) { s[i..i + xx[1]].reverse(); } let answer: String = s.iter().collect(); println!("{answer}"); }