fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s: Vec = s.trim().chars().collect(); let n = s.len(); let mut ans = s[0].to_string(); for i in 1..n { if s[i- 1] != s[i] { ans.push(s[i]); } } println!("{}", ans); }