import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    }

} Main public static void main(String[] args) {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    } main {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    } 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]; a new int[m] m int[] b = new int[m]; b new int[m] m for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 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[] cnt = new int[n]; cnt new int[n] n for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        } {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        } for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            } int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            } {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            } if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k]; a[j] == k + 1 || b[j] == k + 1 a[j] == k + 1 a[j] a j k + 1 k 1 b[j] == k + 1 b[j] b j k + 1 k 1 ++cnt[k] cnt[k] cnt k for (int c : cnt) {
            System.out.println(c);
        } int c cnt {
            System.out.println(c);
        } {
            System.out.println(c);
        } System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {

    public static void main(String[] args) {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    }

} public class Main {

    public static void main(String[] args) {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // ABC061B - Counting Roads

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();   // 2 <= n,m <= 50
        int m = sc.nextInt();

        int[] a = new int[m];   // 1 <= a,b, <= n
        int[] b = new int[m];   // a <> b
        
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        
        int[] cnt = new int[n];
        for (int j = 0; j < m; j++) {
            for (int k = 0; k < n; k++) {
                if (a[j] == k + 1 || b[j] == k + 1) ++cnt[k];
            }
        }
        
        for (int c : cnt) {
            System.out.println(c);
        }
    }

}