use proconio::{input, marker::Bytes}; fn main() { input! { s: Bytes, } let x = s.iter().position(|c| b'0' <= *c && *c <= b'9').unwrap(); println!( "{}{}", s[..x] .iter() .rev() .map(|c| (*c as char).to_string()) .collect::>() .join(""), s[x..] .iter() .map(|c| (*c as char).to_string()) .collect::>() .join("") ); }