const MOD: u64 = 1_000000000 + 7; fn main() { let mut sc = Scanner::new(); let mut cnt = [0; 256]; let s = sc.next(); for c in s.into_bytes() { cnt[c as usize] += 1 } println!("{} {} {} {} {}", cnt['Y' as usize], cnt['E' as usize], cnt['A' as usize], cnt['H' as usize], cnt['!' as usize]); } struct Scanner { reader: std::io::Stdin, tokens: std::collections::VecDeque, } impl Scanner { fn new() -> Self { Scanner { reader: std::io::stdin(), tokens: std::collections::VecDeque::new(), } } fn next(&mut self) -> String { if self.tokens.is_empty() { let mut s = String::new(); loop { self.reader.read_line(&mut s).ok(); let s = s.trim(); if s.len() != 0 { for it in s.split_whitespace() { self.tokens.push_back(it.into()) } break; } } } self.tokens.pop_front().unwrap() } fn next_generics(&mut self) -> T where T: std::str::FromStr + std::marker::Copy, ::Err: std::fmt::Debug { self.next().parse().unwrap() } #[allow(dead_code)] fn next_i32(&mut self) -> i32 { self.next_generics::() } #[allow(dead_code)] fn next_i64(&mut self) -> i64 { self.next_generics::() } #[allow(dead_code)] fn next_u64(&mut self) -> u64 { self.next_generics::() } #[allow(dead_code)] fn next_usize(&mut self) -> usize { self.next_generics::() } }