fn main() { proconio::input! { s: String, } let mut c = s.chars().collect::>(); for i in 0..c.len() { let mut max_index = i; for j in i..c.len() { if c[j] > c[max_index] { max_index = j; } } if max_index != 0 { c.swap(i, max_index); break; } } println!("{}", c.iter().collect::()); }