import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} 
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} 
} Main public static void main(String[] args) {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} main {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		} catch(Exception e){
			e.getMessage();
		} Exception e {
			e.getMessage();
		} e.getMessage() e.getMessage e {
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[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[] result = new int[N+1]; result new int[N+1] N+1 N 1 for(int i = 0; i < N+1; i++){
				result[i] = 0;
			} int i = 0; int i = 0; i 0 i < N+1 i N+1 N 1 i++ i++ i {
				result[i] = 0;
			} {
				result[i] = 0;
			} result[i] = 0 result[i] result i 0 for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			} {
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			} int temp = sc.nextInt(); temp sc.nextInt() sc.nextInt sc result[temp]++ result[temp] result temp temp = sc.nextInt() temp sc.nextInt() sc.nextInt sc result[temp]++ result[temp] result temp for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
				System.out.println(result[i]);
			} {
				System.out.println(result[i]);
			} System.out.println(result[i]) System.out.println System.out System System.out result[i] result i String[] args args public class Main {
    public static void main(String[] args) {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} 
} public class Main {
    public static void main(String[] args) {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} 
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
		try{
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			int M = sc.nextInt();
			int[] result = new int[N+1];
			for(int i = 0; i < N+1; i++){
				result[i] = 0;
			}
			for(int i = 0; i < M; i++){
				int temp = sc.nextInt();
				result[temp]++;
				temp = sc.nextInt();
				result[temp]++;
			}
			for(int i = 1; i < N+1; i++){
				System.out.println(result[i]);
			}
			
		}catch(Exception e){
			e.getMessage();
		}
	} 
}