import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] ar = new int[M]; ar new int[M] M int[] br = new int[M]; br new int[M] M for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        } {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        } ar[i] = Integer.parseInt(sc.next()) ar[i] ar i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc br[i] = Integer.parseInt(sc.next()) br[i] br i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        } {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        } int cnt = 0; cnt 0 for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            } {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            } if (ar[j] == i || br[j] == i) {
                    cnt++;
                } ar[j] == i || br[j] == i ar[j] == i ar[j] ar j i br[j] == i br[j] br j i {
                    cnt++;
                } cnt++ cnt out.println(cnt) out.println out cnt out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        int[] ar = new int[M];
        int[] br = new int[M];
        for (int i = 0; i < M; i++) {
            ar[i] = Integer.parseInt(sc.next());
            br[i] = Integer.parseInt(sc.next());
        }
        
        for (int i = 1; i <= N; i++) {
            int cnt = 0;
            for (int j = 0; j < M; j++) {
                if (ar[j] == i || br[j] == i) {
                    cnt++;
                }
            }
            out.println(cnt);
        }
        
        out.flush();
    }
}