fn main() { let mut vs: Vec = input_line_string().chars().collect(); let swap: Vec = input_line_vc(); vs.swap(swap[0], swap[1]); println!("{}", vs.iter().collect::()); } fn input_line_vc() -> Vec { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() } fn input_line_string() -> String { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().to_string() }