use proconio::input; fn main(){ input!{ s:String, } let mut s :Vec=s.chars().collect(); let mut a=' '; for i in s{ if a!=i{ print!("{}",i); } a=i; } }