import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
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();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	}

	private static Map<Integer, Integer> initMap(int cityCnt) {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	}
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map 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();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	}

	private static Map<Integer, Integer> initMap(int cityCnt) {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		} {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		} 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 Map<Integer, Integer> map = initMap(cityCnt); map initMap(cityCnt) initMap cityCnt for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			} int i = 0; int i = 0; i 0 i < routeCnt i routeCnt i++ i++ i {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			} {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			} for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				} int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				} {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				} int routeA = scanner.nextInt(); routeA scanner.nextInt() scanner.nextInt scanner if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					} map.containsKey(routeA) map.containsKey map routeA {
						map.put(routeA, map.get(routeA) + 1);
					} map.put(routeA, map.get(routeA) + 1) map.put map routeA map.get(routeA) + 1 map.get(routeA) map.get map routeA 1 {
						map.put(routeA, 1);
					} map.put(routeA, 1) map.put map routeA 1 for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			} Entry<Integer, Integer> entry map.entrySet() map.entrySet map {
				System.out.println(entry.getValue());
			} {
				System.out.println(entry.getValue());
			} System.out.println(entry.getValue()) System.out.println System.out System System.out entry.getValue() entry.getValue entry String[] args args private static Map<Integer, Integer> initMap(int cityCnt) {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	} initMap {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	} Map<Integer, Integer> map = new HashMap<Integer, Integer>(); map new HashMap<Integer, Integer>() for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		} int i = 1; int i = 1; i 1 i <= cityCnt i cityCnt i++ i++ i {
			map.put(i, 0);
		} {
			map.put(i, 0);
		} map.put(i, 0) map.put map i 0 return map; map int cityCnt cityCnt public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	}

	private static Map<Integer, Integer> initMap(int cityCnt) {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int cityCnt = scanner.nextInt();
			int routeCnt = scanner.nextInt();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	}

	private static Map<Integer, Integer> initMap(int cityCnt) {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	}
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
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();

			Map<Integer, Integer> map = initMap(cityCnt);
			// input
			for (int i = 0; i < routeCnt; i++) {
				for (int j = 0; j < 2; j++) {
					int routeA = scanner.nextInt();
					if (map.containsKey(routeA)) {
						map.put(routeA, map.get(routeA) + 1);
					} else {
						map.put(routeA, 1);
					}
				}
			}
			// output
			for (Entry<Integer, Integer> entry : map.entrySet()) {
				System.out.println(entry.getValue());
			}
		}
	}

	private static Map<Integer, Integer> initMap(int cityCnt) {
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 1; i <= cityCnt; i++) {
			map.put(i, 0);
		}
		return map;
	}
}