import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(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 = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(i);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(i);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(i);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] a = new int[M]; a new int[M] M int[] b = new int[M]; b new int[M] M for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		} {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		} a[i] = Integer.parseInt(sc.next()) a[i] a i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int[] cnt = new int[N]; cnt new int[N] N for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		} int i =0; int i =0; i 0 i < N i N i++ i++ i {
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		} {
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		} for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			} {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			} if(a[j] == i+1) {
					cnt[i]++;
				} a[j] == i+1 a[j] a j i+1 i 1 {
					cnt[i]++;
				} cnt[i]++ cnt[i] cnt i if(b[j] == i+1) {
					cnt[i]++;
				} b[j] == i+1 b[j] b j i+1 i 1 {
					cnt[i]++;
				} cnt[i]++ cnt[i] cnt i for(int i : cnt) {
			System.out.println(i);
		} int i cnt {
			System.out.println(i);
		} {
			System.out.println(i);
		} System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(i);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(i);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int[] a = new int[M];
		int[] b = new int[M];
		for(int i = 0;i < M;i++) {
			a[i] = Integer.parseInt(sc.next());
			b[i] = Integer.parseInt(sc.next());
		}
		sc.close();
		int[] cnt = new int[N];
		for(int i =0;i < N;i++){
			for(int j = 0;j < M;j++) {
				if(a[j] == i+1) {
					cnt[i]++;
				}
				if(b[j] == i+1) {
					cnt[i]++;
				}
			}
		}
		for(int i : cnt) {
			System.out.println(i);
		}
	}
}