use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let v: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut a = vec![0; v[1]]; for t in v[2..].chunks(2) { a[v[1] - t[0]] += 1; a[v[1] - t[1]] -= 1; } a.iter().fold(0, |a, x| { print!("{} ", a + x); a + x }); }