import java.util.Scanner;

public 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[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[i]);
		}
	}
} import java.util.Scanner; Scanner 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[] a = new int[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[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[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[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[M]; a new int[M] M int[] b = new int[M]; b new int[M] M int[] res = new int[N+1]; res new int[N+1] N+1 N 1 for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			res[a[i]]++;
			res[b[i]]++;
		} {
			res[a[i]]++;
			res[b[i]]++;
		} res[a[i]]++ res[a[i]] res a[i] a i res[b[i]]++ res[b[i]] res b[i] b i for (int i=1; i<res.length; i++) {
			System.out.println(res[i]);
		} int i=1; int i=1; i 1 i<res.length i res.length res res.length i++ i++ i {
			System.out.println(res[i]);
		} {
			System.out.println(res[i]);
		} System.out.println(res[i]) System.out.println System.out System System.out res[i] res 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[] a = new int[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[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[] a = new int[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[i]);
		}
	}
} Main
import java.util.Scanner;

public 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[M];
		int[] b = new int[M];
		int[] res = new int[N+1];
		for (int i=0; i<M; i++) {
			a[i] = sc.nextInt();
			b[i] = sc.nextInt();
		}
		for (int i=0; i<M; i++) {
			res[a[i]]++;
			res[b[i]]++;
		}
		for (int i=1; i<res.length; i++) {
			System.out.println(res[i]);
		}
	}
}
