N, M = gets.split.map(&:to_i) rui = Array.new(N + 2, 0) M.times do l, r = gets.split.map(&:to_i) rui[l + 1] -= 1 rui[r] += 1 end sum = 0 1.upto(N) do |d| sum += rui[d] rui[d] = sum end puts rui[1..N].reverse