import java.util.*;
public class Main{
  public static void main(String[] args){
    try{
      Scanner scanner = new Scanner(System.in);
      int N = scanner.nextInt();
      int M = scanner.nextInt();
      int[][] cities =new int[N][N];
      int i = 0;
      int j = 0;
      int sum = 0;

      for(i=0;i<N;i++){
        for(j=0;j<N;j++){
          cities[i][j]=0;
        }
      }

      for(i=0;i<M;i++){
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        cities[a-1][b-1]++;
        cities[b-1][a-1]++;
      }
      for(i=0;i<N;i++){
        sum = 0;
        for(j=0;j<N;j++){
          sum+=cities[i][j];
        }
        System.out.println(sum);
      }
      scanner.close();
    }catch(Exception e){
      System.out.println("何か入力してください");
    }
  }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz