import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int[] ab = new int[2*M]; ab new int[2*M] 2*M 2 M int[] cities = new int[N]; cities new int[N] N for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		} int i=0; int i=0; i 0 i<2*M i 2*M 2 M i++ i++ i {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		} {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		} ab[i] = sc.nextInt() ab[i] ab i sc.nextInt() sc.nextInt sc for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			} int j=0; int j=0; j 0 j<N j N j++ j++ j {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			} {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			} if(ab[i]-1 == j ) {
					cities[j] += 1;
				} ab[i]-1 == j ab[i]-1 ab[i] ab i 1 j {
					cities[j] += 1;
				} cities[j] += 1 cities[j] cities j 1 for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		} int k=0; int k=0; k 0 k<N k N k++ k++ k {
			System.out.println(cities[k]);
		} {
			System.out.println(cities[k]);
		} System.out.println(cities[k]) System.out.println System.out System System.out cities[k] cities k String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();

		int[] ab = new int[2*M];
		int[] cities = new int[N];
		for(int i=0; i<2*M; i++) {
			ab[i] = sc.nextInt();

			for(int j=0; j<N; j++) {
				if(ab[i]-1 == j ) {
					cities[j] += 1;
				}
			}
		}

		for(int k=0; k<N; k++) {
			System.out.println(cities[k]);
		}




	}

}
