fn run<'a, I: Iterator>(mut scanner: I) { macro_rules! scan { ([$t:tt; $n:expr]) => ((0..$n).map(|_| scan!($t)).collect::>()); (($($t:tt),*)) => (($(scan!($t)),*)); ([$($t:tt),*]) => ([$(scan!($t)),*]); (Usize1) => (scan!(usize) - 1); (Bytes) => (scan!(String).into_bytes()); ($t:ty) => (scanner.next().unwrap().parse::<$t>().unwrap()); } macro_rules! input { ($($($v:ident)* : $t:tt),* $(,)?) => ($(let $($v)* = scan!($t);)*); } input! { s: Bytes, } let mut p = 0; for b in s { if b != p { print!("{}", b as char); p = b; } } println!(); } fn main() { let ref mut buf = Vec::new(); std::io::Read::read_to_end(&mut std::io::stdin(), buf).ok(); run(std::str::from_utf8(buf).unwrap().split_whitespace()); }