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("何か入力してください");
    }
  }
} import java.util.*; util.* java 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("何か入力してください");
    }
  }
} 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("何か入力してください");
    }
  } main {
    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("何か入力してください");
    }
  } 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("何か入力してください");
    } catch(Exception e){
      System.out.println("何か入力してください");
    } Exception e {
      System.out.println("何か入力してください");
    } System.out.println("何か入力してください") System.out.println System.out System System.out "何か入力してください" {
      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();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner int[][] cities =new int[N][N]; cities new int[N][N] N N int i = 0; i 0 int j = 0; j 0 int sum = 0; sum 0 for(i=0;i<N;i++){
        for(j=0;j<N;j++){
          cities[i][j]=0;
        }
      } i=0; i=0 i 0 i<N i N i++ i++ i {
        for(j=0;j<N;j++){
          cities[i][j]=0;
        }
      } {
        for(j=0;j<N;j++){
          cities[i][j]=0;
        }
      } for(j=0;j<N;j++){
          cities[i][j]=0;
        } j=0; j=0 j 0 j<N j N j++ j++ j {
          cities[i][j]=0;
        } {
          cities[i][j]=0;
        } cities[i][j]=0 cities[i][j] cities[i] 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]++;
      } i=0; i=0 i 0 i<M i M i++ i++ i {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        cities[a-1][b-1]++;
        cities[b-1][a-1]++;
      } {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        cities[a-1][b-1]++;
        cities[b-1][a-1]++;
      } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner cities[a-1][b-1]++ cities[a-1][b-1] cities[a-1] cities a-1 a 1 b-1 b 1 cities[b-1][a-1]++ cities[b-1][a-1] cities[b-1] cities b-1 b 1 a-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);
      } i=0; i=0 i 0 i<N i N i++ i++ i {
        sum = 0;
        for(j=0;j<N;j++){
          sum+=cities[i][j];
        }
        System.out.println(sum);
      } {
        sum = 0;
        for(j=0;j<N;j++){
          sum+=cities[i][j];
        }
        System.out.println(sum);
      } sum = 0 sum 0 for(j=0;j<N;j++){
          sum+=cities[i][j];
        } j=0; j=0 j 0 j<N j N j++ j++ j {
          sum+=cities[i][j];
        } {
          sum+=cities[i][j];
        } sum+=cities[i][j] sum cities[i][j] cities[i] cities i j System.out.println(sum) System.out.println System.out System System.out sum scanner.close() scanner.close scanner String[] args args 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("何か入力してください");
    }
  }
} 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("何か入力してください");
    }
  }
} Main
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("何か入力してください");
    }
  }
}
