import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    } 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[][] graph = new int[n][n]; graph new int[n][n] n n for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        } {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        } int tmpFrom = sc.nextInt(); tmpFrom sc.nextInt() sc.nextInt sc int tmpTo = sc.nextInt(); tmpTo sc.nextInt() sc.nextInt sc graph[tmpFrom-1][tmpTo-1]++ graph[tmpFrom-1][tmpTo-1] graph[tmpFrom-1] graph tmpFrom-1 tmpFrom 1 tmpTo-1 tmpTo 1 graph[tmpTo-1][tmpFrom-1]++ graph[tmpTo-1][tmpFrom-1] graph[tmpTo-1] graph tmpTo-1 tmpTo 1 tmpFrom-1 tmpFrom 1 for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        } {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        } int cityCount = 0; cityCount 0 for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            } {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            } if (graph[i][j] > 0) cityCount += graph[i][j]; graph[i][j] > 0 graph[i][j] graph[i] graph i j 0 cityCount += graph[i][j] cityCount graph[i][j] graph[i] graph i j System.out.println(cityCount) System.out.println System.out System System.out cityCount String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] graph = new int[n][n];
        for (int i = 0; i < m; i++) {
            int tmpFrom = sc.nextInt();
            int tmpTo = sc.nextInt();

            graph[tmpFrom-1][tmpTo-1]++;
            graph[tmpTo-1][tmpFrom-1]++;
        }


        for (int i = 0; i < n; i++) {
            int cityCount = 0;
            for (int j = 0; j < n; j++) {
                if (graph[i][j] > 0) cityCount += graph[i][j];
            }

            System.out.println(cityCount);
        }
    }
}
