import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[2*M];
		for(int i = 0; i < 2*M; i++){
			a[i] = sc.nextInt();
		}

		int[] town = new int[N];
		int index = 0;
		for(int i = 0; i < 2*M; i++){
			index = a[i] - 1;
			town[index]++;
			
		}

		for(int i = 0; i < N; i++){
			System.out.println(town[i]);
		}
	}
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[2*M];
		for(int i = 0; i < 2*M; i++){
			a[i] = sc.nextInt();
		}

		int[] town = new int[N];
		int index = 0;
		for(int i = 0; i < 2*M; i++){
			index = a[i] - 1;
			town[index]++;
			
		}

		for(int i = 0; i < N; i++){
			System.out.println(town[i]);
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[2*M];
		for(int i = 0; i < 2*M; i++){
			a[i] = sc.nextInt();
		}

		int[] town = new int[N];
		int index = 0;
		for(int i = 0; i < 2*M; i++){
			index = a[i] - 1;
			town[index]++;
			
		}

		for(int i = 0; i < N; i++){
			System.out.println(town[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[2*M];
		for(int i = 0; i < 2*M; i++){
			a[i] = sc.nextInt();
		}

		int[] town = new int[N];
		int index = 0;
		for(int i = 0; i < 2*M; i++){
			index = a[i] - 1;
			town[index]++;
			
		}

		for(int i = 0; i < N; i++){
			System.out.println(town[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[] a = new int[2*M]; a new int[2*M] 2*M 2 M for(int i = 0; i < 2*M; i++){
			a[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < 2*M i 2*M 2 M i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int[] town = new int[N]; town new int[N] N int index = 0; index 0 for(int i = 0; i < 2*M; i++){
			index = a[i] - 1;
			town[index]++;
			
		} int i = 0; int i = 0; i 0 i < 2*M i 2*M 2 M i++ i++ i {
			index = a[i] - 1;
			town[index]++;
			
		} {
			index = a[i] - 1;
			town[index]++;
			
		} index = a[i] - 1 index a[i] - 1 a[i] a i 1 town[index]++ town[index] town index for(int i = 0; i < N; i++){
			System.out.println(town[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			System.out.println(town[i]);
		} {
			System.out.println(town[i]);
		} System.out.println(town[i]) System.out.println System.out System System.out town[i] town i String[] args args
import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[2*M];
		for(int i = 0; i < 2*M; i++){
			a[i] = sc.nextInt();
		}

		int[] town = new int[N];
		int index = 0;
		for(int i = 0; i < 2*M; i++){
			index = a[i] - 1;
			town[index]++;
			
		}

		for(int i = 0; i < N; i++){
			System.out.println(town[i]);
		}
	}
}
