import java.util.*;
import java.lang.*;
 
public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    }

} import java.util.*; util.* java import java.lang.*; lang.* java public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    }

} Main public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    } main {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    } Scanner sc  = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] test  = new int[1000000]; test new int[1000000] 1000000 for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        } int i = 0; int i = 0; i 0 i < 2 * M i 2 * M 2 M i++ i++ i {
            int c = Integer.parseInt(sc.next());
            test[c]++;
        } {
            int c = Integer.parseInt(sc.next());
            test[c]++;
        } int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc test[c]++ test[c] test c for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        } int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
            System.out.println(test[i]);
        } {
            System.out.println(test[i]);
        } System.out.println(test[i]) System.out.println System.out System System.out test[i] test i System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    }

} public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    }

} Main
import java.util.*;
import java.lang.*;
 
public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);


        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());


        int[] test  = new int[1000000];        
        for(int i = 0; i < 2 * M; i++){
            int c = Integer.parseInt(sc.next());
            test[c]++;
        }

        for(int i = 1; i < N+1 ; i++){
            System.out.println(test[i]);
        }

        System.out.println();
    }

}