import 'dart:convert';
import 'dart:io';
import 'dart:async';

Future main() async {
  List nm = stdin.readLineSync().split(" ").map((x) => int.parse(x)).toList();
  Stream<String> abLines =
      stdin.transform(utf8.decoder).transform(LineSplitter()); // ここ大事（複数行入力）
  int lineNum;
  lineNum = 1;
  List ab = [];
  List abi = [];
  await for (String line in abLines) {
    lineNum = lineNum + 1;

    abi = line.split(" ").map((x) => int.parse(x)).toList();
    ab.add(abi);

    if (lineNum > nm[1]) break; // ここの場所！
  }

  List bucket = [];
  for (int i = 0; i < 2 * nm[1] + 2; i++) {
    bucket.add(0);
  }
  // print(bucket);

  for (int i = 0; i < ab.length; i++) {
    bucket[ab[i][0]] = bucket[ab[i][0]] + 1;
    bucket[ab[i][1]] = bucket[ab[i][1]] + 1;
  }
  // print(bucket);
  for (int i = 0; i < bucket.length; i++) {
    if (bucket[i] != 0) print(bucket[i]);
  }
}
