use std::io; fn main() { println!("{}", reversed(read_line())); } fn read_line() -> String { let mut line = String::new(); io::stdin().read_line(&mut line) .expect("Failed to read line"); return line } fn reversed(s: String) -> String { return s.chars().rev().collect::(); }