use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let n: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut v = vec![0; n[1]]; for a in &n[1..] { v[a - 1] += 1; } for i in (0..v.len() - 1).rev() { v[i] += v[i + 1]; } println!("{}", v.iter().map(|x| x.to_string()).collect::>().join(" ")) }