'use strict'

function main(input) {
  input = input.split('\n').map(v => v.split(' ').map(v => ~~v))
  const n = input[0][0]
  const m = input[0][1]

  const roads = input.slice(1, input.length)

  const counts = Array.apply(null, { length: n }).map(v => 0)
  for (let i = 0; i < m; i++) {
    counts[roads[i][0] - 1] += 1
    counts[roads[i][1] - 1] += 1
  }
  for (let i in counts) {
    console.log(counts[i])
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))