import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException{
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}
	static class CountingRoads {
		private int city[];
		private Scanner scanner;
		private int n;
		private int m;

		public CountingRoads() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		}
		public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		}

		public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		}
	}

} import java.io.IOException; IOException java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException{
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}
	static class CountingRoads {
		private int city[];
		private Scanner scanner;
		private int n;
		private int m;

		public CountingRoads() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		}
		public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		}

		public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		}
	}

} Main public static void main(String[] args) throws IOException{
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	} main {
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	} CountingRoads solver = new CountingRoads(); solver new CountingRoads() solver.readInput() solver.readInput solver solver.solve() solver.solve solver solver.writeOutput() solver.writeOutput solver String[] args args static class CountingRoads {
		private int city[];
		private Scanner scanner;
		private int n;
		private int m;

		public CountingRoads() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		}
		public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		}

		public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		}
	} CountingRoads private int city[]; city private Scanner scanner; scanner private int n; n private int m; m public CountingRoads() {
			this.scanner = new Scanner(System.in);
		} CountingRoads {
			this.scanner = new Scanner(System.in);
		} this.scanner = new Scanner(System.in) this.scanner this this.scanner new Scanner(System.in) public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		} readInput {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		} n = Integer.parseInt(scanner.next()) n Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner m = Integer.parseInt(scanner.next()) m Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner city = new int[n] city new int[n] n Arrays.fill(city, 0) Arrays.fill Arrays city 0 public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		} solve {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		} for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			} int i=0; int i=0; i 0 i<m i m i++ i++ i {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			} {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			} for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				} int j=0; int j=0; j 0 j<2 j 2 j++ j++ j {
					city[Integer.parseInt(scanner.next())-1]++;
				} {
					city[Integer.parseInt(scanner.next())-1]++;
				} city[Integer.parseInt(scanner.next())-1]++ city[Integer.parseInt(scanner.next())-1] city Integer.parseInt(scanner.next())-1 Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner 1 public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		} writeOutput {
			for(int o:city) {
				System.out.println(o);
			}
		} for(int o:city) {
				System.out.println(o);
			} int o city {
				System.out.println(o);
			} {
				System.out.println(o);
			} System.out.println(o) System.out.println System.out System System.out o public class Main {
	public static void main(String[] args) throws IOException{
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}
	static class CountingRoads {
		private int city[];
		private Scanner scanner;
		private int n;
		private int m;

		public CountingRoads() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		}
		public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		}

		public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		}
	}

} public class Main {
	public static void main(String[] args) throws IOException{
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}
	static class CountingRoads {
		private int city[];
		private Scanner scanner;
		private int n;
		private int m;

		public CountingRoads() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		}
		public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		}

		public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		}
	}

} Main
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException{
		CountingRoads solver = new CountingRoads();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}
	static class CountingRoads {
		private int city[];
		private Scanner scanner;
		private int n;
		private int m;

		public CountingRoads() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			n = Integer.parseInt(scanner.next());
			m = Integer.parseInt(scanner.next());
			city = new int[n];
			Arrays.fill(city, 0);
		}
		public void solve() {
			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					city[Integer.parseInt(scanner.next())-1]++;
				}
			}
		}

		public void writeOutput() {
			for(int o:city) {
				System.out.println(o);
			}
		}
	}

}