import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val m = sc.nextInt

  val iAbt = List.fill(m)(List(sc.nextInt, sc.nextInt))

  val abt = iAbt.flatten

  val resArr = abt.foldLeft(new Array[Int](n)){case (arr, c) =>
    val newVal = arr(c - 1) + 1
    arr.update(c - 1, newVal)
    arr
  }
  resArr.foreach(println)
}
