import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	} main {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	} 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 * 2]; a new int[m * 2] m * 2 m 2 for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m * 2 i m * 2 m 2 i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		} {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		} int count = 0; count 0 for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			} int j = 0; int j = 0; j 0 j < m * 2 j m * 2 m 2 j++ j++ j {
				if (a[j] == i) {
					count++;
				}
			} {
				if (a[j] == i) {
					count++;
				}
			} if (a[j] == i) {
					count++;
				} a[j] == i a[j] a j i {
					count++;
				} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	}
} public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	}
} Main
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();

		int[] a = new int[m * 2];

		for (int i = 0; i < m * 2; i++) {
			a[i] = sc.nextInt();
		}

		for (int i = 1; i <= n; i++) {
			int count = 0;
			for (int j = 0; j < m * 2; j++) {
				if (a[j] == i) {
					count++;
				}
			}
			System.out.println(count);
		}

	}
}