import java.io.PrintWriter;
import java.util.Scanner;

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[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util 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[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    }
} 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[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    } 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[] road = new int[2 * M]; road new int[2 * M] 2 * M 2 M int[] count = new int[N]; count new int[N] N for (int i = 0; i < 2 * M; i++) {
            road[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < 2 * M i 2 * M 2 M i++ i++ i {
            road[i] = Integer.parseInt(sc.next());
        } {
            road[i] = Integer.parseInt(sc.next());
        } road[i] = Integer.parseInt(sc.next()) road[i] road i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        } int i = 0; int i = 0; i 0 i < 2 * M i 2 * M 2 M i++ i++ i {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        } {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        } for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            } int j = 1; int j = 1; j 1 j <= N j N j++ j++ j {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            } {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            } if (road[i] == j) {
                    count[j - 1]++;
                } road[i] == j road[i] road i j {
                    count[j - 1]++;
                } count[j - 1]++ count[j - 1] count j - 1 j 1 PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            out.println(count[i]);
            out.flush();
        } {
            out.println(count[i]);
            out.flush();
        } out.println(count[i]) out.println out count[i] count i out.flush() out.flush out sc.close() sc.close sc 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[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    }
} 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[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    }
} Main
import java.io.PrintWriter;
import java.util.Scanner;

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[] road = new int[2 * M];
        int[] count = new int[N];

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

        for (int i = 0; i < 2 * M; i++) {
            for (int j = 1; j <= N; j++) {
                if (road[i] == j) {
                    count[j - 1]++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        for (int i = 0; i < N; i++) {
            out.println(count[i]);
            out.flush();
        }
        sc.close();
    }
}