import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    }
} import java.util.HashMap; HashMap java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner HashMap<Integer, Integer> hashMap = new HashMap<>(); hashMap new HashMap<>() for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        } {
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            } hashMap.containsKey(a) hashMap.containsKey hashMap a {
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            } int tmp = hashMap.get(a); tmp hashMap.get(a) hashMap.get hashMap a tmp += 1 tmp 1 hashMap.put(a, tmp) hashMap.put hashMap a tmp {
                hashMap.put(a, 1);
            } hashMap.put(a, 1) hashMap.put hashMap a 1 if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            } hashMap.containsKey(b) hashMap.containsKey hashMap b {
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            } int tmp = hashMap.get(b); tmp hashMap.get(b) hashMap.get hashMap b tmp += 1 tmp 1 hashMap.put(b, tmp) hashMap.put hashMap b tmp {
                hashMap.put(b, 1);
            } hashMap.put(b, 1) hashMap.put hashMap b 1 for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        } {
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        } if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            } hashMap.containsKey(i) hashMap.containsKey hashMap i {
                System.out.println(hashMap.get(i));
            } System.out.println(hashMap.get(i)) System.out.println System.out System System.out hashMap.get(i) hashMap.get hashMap i {
                System.out.println(0);
            } System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    }
} Main
import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        HashMap<Integer, Integer> hashMap = new HashMap<>();

        for(int i=0; i<M; i++){
            int a = scanner.nextInt();
            int b = scanner.nextInt();

            if(hashMap.containsKey(a)){
                int tmp = hashMap.get(a);
                tmp += 1;
                hashMap.put(a, tmp);
            }else{
                hashMap.put(a, 1);
            }

            if(hashMap.containsKey(b)){
                int tmp = hashMap.get(b);
                tmp += 1;
                hashMap.put(b, tmp);
            }else{
                hashMap.put(b, 1);
            }
        }

        for(int i=1; i<=N; i++){
            if(hashMap.containsKey(i)){
                System.out.println(hashMap.get(i));
            }else{
                System.out.println(0);
            }
        }
    }
}
