import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    }
}
 import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    } main {
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] array = new int[m][2]; array new int[m][2] m 2 int[] count = new int[n]; count new int[n] n for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      } {
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      } array[i][0] = sc.nextInt() array[i][0] array[i] array i 0 sc.nextInt() sc.nextInt sc array[i][1] = sc.nextInt() array[i][1] array[i] array i 1 sc.nextInt() sc.nextInt sc for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      } {
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      } for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        } int j = 1; int j = 1; j 1 j <= n j n j++ j++ j {
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        } {
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        } if(array[i][0]==j||array[i][1]==j)count[j-1]++; array[i][0]==j||array[i][1]==j array[i][0]==j array[i][0] array[i] array i 0 j array[i][1]==j array[i][1] array[i] array i 1 j count[j-1]++ count[j-1] count j-1 j 1 for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      System.out.println(count[i]);
      } {
      System.out.println(count[i]);
      } System.out.println(count[i]) System.out.println System.out System System.out count[i] count i String[] args args public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    }
} public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    }
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] array = new int[m][2];
      int[] count = new int[n];
      for(int i = 0;i < m;i++){
      	array[i][0] = sc.nextInt();
        array[i][1] = sc.nextInt();
      }
      for(int i = 0;i < m;i++){
      	for(int j = 1;j <= n;j++){
        	if(array[i][0]==j||array[i][1]==j)count[j-1]++;
        }
      }
      for(int i = 0;i < n;i++){
      System.out.println(count[i]);
      }
    }
}

