object Main extends App {
  import scala.io.StdIn._
  val Array(n, m) = readLine.trim.split(' ').map(_.toInt)
  val arms = Array.tabulate(m){_ ⇒
    val Array(x, y) = readLine.trim.split(' ').map(_.toInt - 1)
    (x, y)
  }.sortBy(_._1).map(_._2)
  val min = Array.tabulate(n){i ⇒ i}
  val max = Array.tabulate(n){i ⇒ i}
  for (y ← arms){
    min(y) = Math.min(min(y), min(y + 1))
    min(y + 1) = min(y)
    max(y) = Math.max(max(y), max(y + 1))
    max(y + 1) = max(y)
  }
  println((0 until n).map{i ⇒ max(i) - min(i) + 1}.mkString(" "))
}
