
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		} {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) int cityCnt = scanner.nextInt(); cityCnt scanner.nextInt() scanner.nextInt scanner int routeCnt = scanner.nextInt(); routeCnt scanner.nextInt() scanner.nextInt scanner int[][] map = new int[cityCnt][cityCnt]; map new int[cityCnt][cityCnt] cityCnt cityCnt int a a b; b for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			} int i = 0; int i = 0; i 0 i < routeCnt i routeCnt i++ i++ i {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			} {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			} a = scanner.nextInt() - 1 a scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 b = scanner.nextInt() - 1 b scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 map[a][b]++ map[a][b] map[a] map a b map[b][a]++ map[b][a] map[b] map b a int cnt; cnt StringBuilder builder = new StringBuilder(); builder new StringBuilder() for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			} int i = 0; int i = 0; i 0 i < cityCnt i cityCnt i++ i++ i {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			} {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			} cnt = 0 cnt 0 for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				} int j = 0; int j = 0; j 0 j < cityCnt j cityCnt j++ j++ j {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				} {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				} if (map[i][j] > 0) {
						cnt += map[i][j];
					} map[i][j] > 0 map[i][j] map[i] map i j 0 {
						cnt += map[i][j];
					} cnt += map[i][j] cnt map[i][j] map[i] map i j builder.append(cnt + "\n") builder.append builder cnt + "\n" cnt "\n" System.out.println(builder.toString()) System.out.println System.out System System.out builder.toString() builder.toString builder String[] args args public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			int[][] map = new int[cityCnt][cityCnt];
			int a, b;
			for (int i = 0; i < routeCnt; i++) {
				a = scanner.nextInt() - 1;
				b = scanner.nextInt() - 1;

				map[a][b]++;
				map[b][a]++;
			}

			int cnt;
			StringBuilder builder = new StringBuilder();
			for (int i = 0; i < cityCnt; i++) {
				cnt = 0;
				for (int j = 0; j < cityCnt; j++) {
					if (map[i][j] > 0) {
						cnt += map[i][j];
					}
				}
				builder.append(cnt + "\n");
			}
			System.out.println(builder.toString());
		}
	}
}