use proconio::{fastout, input, marker::Bytes}; #[fastout] fn main() { input! { s: Bytes, } println!("{}", output(solve(s))) } fn solve(s: Vec) -> Vec { let mut ans = vec![s[0]]; s.windows(2).for_each(|s| { if s[0] != s[1] { ans.push(s[1]); } }); ans } fn output(ans: Vec) -> String { String::from_utf8(ans).unwrap() }