import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int[] ary = new int[2*M]; ary new int[2*M] 2*M 2 M for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		} int i =0; int i =0; i 0 i <ary.length i ary.length ary ary.length i++ i++ i {
			ary[i] = scan.nextInt();
		} {
			ary[i] = scan.nextInt();
		} ary[i] = scan.nextInt() ary[i] ary i scan.nextInt() scan.nextInt scan for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		} int i=1; int i=1; i 1 i <= N i N i++ i++ i {
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		} {
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		} int cnt=0; cnt 0 for(int j : ary){
				if( j == i ) cnt++;
			} int j ary {
				if( j == i ) cnt++;
			} {
				if( j == i ) cnt++;
			} if( j == i ) cnt++; j == i j i cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int[] ary = new int[2*M];
		for (int i =0; i <ary.length; i++){
			ary[i] = scan.nextInt();
		}
		for(int i=1; i <= N; i++){
			int cnt=0;
			for(int j : ary){
				if( j == i ) cnt++;
			}
			System.out.println(cnt);
		}
	}

}