import java.util.*;

public class Main {
	
	private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	}

	private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().doit();
	}

} import java.util.*; util.* java public class Main {
	
	private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	}

	private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().doit();
	}

} Main private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	} doit {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		} sc.hasNext() sc.hasNext sc {
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				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 [][] pass = new int[n][n]; pass new int[n][n] n n for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			} {
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			} int a = sc.nextInt() - 1; a sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 int b = sc.nextInt() - 1; b sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 pass[a][b]++ pass[a][b] pass[a] pass a b pass[b][a]++ pass[b][a] pass[b] pass b a for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			} {
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			} int count = 0; count 0 for(int j = 0; j < n;j++){
					count += pass[i][j];
				} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
					count += pass[i][j];
				} {
					count += pass[i][j];
				} count += pass[i][j] count pass[i][j] pass[i] pass i j System.out.println(count) System.out.println System.out System System.out count private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	} debug {
		System.out.println("debug = " + Arrays.deepToString(o));
	} System.out.println("debug = " + Arrays.deepToString(o)) System.out.println System.out System System.out "debug = " + Arrays.deepToString(o) "debug = " Arrays.deepToString(o) Arrays.deepToString Arrays o Object... o o public static void main(String[] args) {
		new Main().doit();
	} main {
		new Main().doit();
	} new Main().doit() new Main().doit new Main() String[] args args public class Main {
	
	private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	}

	private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().doit();
	}

} public class Main {
	
	private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	}

	private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().doit();
	}

} Main
import java.util.*;

public class Main {
	
	private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int n = sc.nextInt();
			int m = sc.nextInt();
			int [][] pass = new int[n][n];
			for(int i = 0; i < m;i++){
				int a = sc.nextInt() - 1;
				int b = sc.nextInt() - 1;
				pass[a][b]++;
				pass[b][a]++;
			}
			
			for(int i = 0; i < n;i++){
				int count = 0;
				for(int j = 0; j < n;j++){
					count += pass[i][j];
				}
				System.out.println(count);
			}
		}
	}

	private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().doit();
	}

}
