import java.util.*;
import java.math.*;

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

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        int[] a = new int[M + 1];
        int[] b = new int[M + 1];

        for (int i = 1; i <= M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }

        int[] r = new int[N + 1];
        for (int i = 1; i <= M; i++) {
            r[a[i]]++;
            r[b[i]]++;
        }

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

        return;
    }

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

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        int[] a = new int[M + 1];
        int[] b = new int[M + 1];

        for (int i = 1; i <= M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }

        int[] r = new int[N + 1];
        for (int i = 1; i <= M; i++) {
            r[a[i]]++;
            r[b[i]]++;
        }

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

        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        int[] a = new int[M + 1];
        int[] b = new int[M + 1];

        for (int i = 1; i <= M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }

        int[] r = new int[N + 1];
        for (int i = 1; i <= M; i++) {
            r[a[i]]++;
            r[b[i]]++;
        }

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

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

        int[] a = new int[M + 1];
        int[] b = new int[M + 1];

        for (int i = 1; i <= M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }

        int[] r = new int[N + 1];
        for (int i = 1; i <= M; i++) {
            r[a[i]]++;
            r[b[i]]++;
        }

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

        return;
    } 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[] a = new int[M + 1]; a new int[M + 1] M + 1 M 1 int[] b = new int[M + 1]; b new int[M + 1] M + 1 M 1 for (int i = 1; i <= M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        } int i = 1; int i = 1; i 1 i <= M i M i++ i++ i {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc int[] r = new int[N + 1]; r new int[N + 1] N + 1 N 1 for (int i = 1; i <= M; i++) {
            r[a[i]]++;
            r[b[i]]++;
        } int i = 1; int i = 1; i 1 i <= M i M i++ i++ i {
            r[a[i]]++;
            r[b[i]]++;
        } {
            r[a[i]]++;
            r[b[i]]++;
        } r[a[i]]++ r[a[i]] r a[i] a i r[b[i]]++ r[b[i]] r b[i] b i for (int i = 1; i <= N; i++) {
            System.out.println(r[i]);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            System.out.println(r[i]);
        } {
            System.out.println(r[i]);
        } System.out.println(r[i]) System.out.println System.out System System.out r[i] r i return;
import java.util.*;
import java.math.*;

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

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        int[] a = new int[M + 1];
        int[] b = new int[M + 1];

        for (int i = 1; i <= M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }

        int[] r = new int[N + 1];
        for (int i = 1; i <= M; i++) {
            r[a[i]]++;
            r[b[i]]++;
        }

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

        return;
    }

}