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 n;
		private int m;

		private int a[];
		private int b[];

		private Scanner scanner;
		private int output[];

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

		}
		public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		}

		public void solve() {
		}
		public void writeOutput() {
			for(int o:output) {
				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 n;
		private int m;

		private int a[];
		private int b[];

		private Scanner scanner;
		private int output[];

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

		}
		public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		}

		public void solve() {
		}
		public void writeOutput() {
			for(int o:output) {
				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 n;
		private int m;

		private int a[];
		private int b[];

		private Scanner scanner;
		private int output[];

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

		}
		public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		}

		public void solve() {
		}
		public void writeOutput() {
			for(int o:output) {
				System.out.println(o);
			}
		}
	} CountingRoads private int n; n private int m; m private int a[]; a private int b[]; b private Scanner scanner; scanner private int output[]; output public CountingRoads() {
			scanner = new Scanner(System.in);

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

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		} readInput {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		} n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner m = scanner.nextInt() m scanner.nextInt() scanner.nextInt scanner output = new int[n] output new int[n] n Arrays.fill(output, 0) Arrays.fill Arrays output 0 for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			} int i=0; int i=0; i 0 i<m i m i++ i++ i {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			} {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			} for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				} int j=0; int j=0; j 0 j<2 j 2 j++ j++ j {
					output[scanner.nextInt()-1]++;
				} {
					output[scanner.nextInt()-1]++;
				} output[scanner.nextInt()-1]++ output[scanner.nextInt()-1] output scanner.nextInt()-1 scanner.nextInt() scanner.nextInt scanner 1 public void solve() {
		} solve {
		} public void writeOutput() {
			for(int o:output) {
				System.out.println(o);
			}
		} writeOutput {
			for(int o:output) {
				System.out.println(o);
			}
		} for(int o:output) {
				System.out.println(o);
			} int o output {
				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 n;
		private int m;

		private int a[];
		private int b[];

		private Scanner scanner;
		private int output[];

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

		}
		public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		}

		public void solve() {
		}
		public void writeOutput() {
			for(int o:output) {
				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 n;
		private int m;

		private int a[];
		private int b[];

		private Scanner scanner;
		private int output[];

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

		}
		public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		}

		public void solve() {
		}
		public void writeOutput() {
			for(int o:output) {
				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 n;
		private int m;

		private int a[];
		private int b[];

		private Scanner scanner;
		private int output[];

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

		}
		public void readInput() {
			n = scanner.nextInt();
			m = scanner.nextInt();

			output = new int[n];
			Arrays.fill(output, 0);

			for(int i=0; i<m; i++) {
				for(int j=0; j<2; j++) {
					output[scanner.nextInt()-1]++;
				}
			}

		}

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

}
