
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int[] a = new int[M]; a new int[M] M int[] b = new int[M]; b new int[M] M int sum = 0; sum 0 for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		} {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		} {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		} for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			} {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			} if(a[j] == i) {
					sum++;
				} a[j] == i a[j] a j i {
					sum++;
				} sum++ sum if(b[j] == i) {
					sum++;
				} b[j] == i b[j] b j i {
					sum++;
				} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum sum = 0 sum 0 scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] a = new int[M];
		int[] b = new int[M];
		int sum = 0;
		for(int i = 0; i < M; i++) {
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 1; i <= N; i++) {
			for(int j = 0; j < M; j++) {
				if(a[j] == i) {
					sum++;
				}
				if(b[j] == i) {
					sum++;
				}
			}
			System.out.println(sum);
			sum = 0;
		}
		scan.close();

	}

}
