import java.util.*;
public class Main {
public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

}
} import java.util.*; util.* java public class Main {
public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

}
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

} main {
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N M; M N=sc.nextInt() N sc.nextInt() sc.nextInt sc M=sc.nextInt() M sc.nextInt() sc.nextInt sc int [] num_road = new int[N]; num_road new int[N] N for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    } int a=0; int a=0; a 0 a<M a M a++ a++ a {
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    } {
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    } int a_city =sc.nextInt(); a_city sc.nextInt() sc.nextInt sc int b_city =sc.nextInt(); b_city sc.nextInt() sc.nextInt sc num_road[a_city-1]++ num_road[a_city-1] num_road a_city-1 a_city 1 num_road[b_city-1]++ num_road[b_city-1] num_road b_city-1 b_city 1 for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    } int b=0; int b=0; b 0 b<N b N b++ b++ b {
        System.out.println(num_road[b]);
    } {
        System.out.println(num_road[b]);
    } System.out.println(num_road[b]) System.out.println System.out System System.out num_road[b] num_road b String[] args args public class Main {
public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

}
} public class Main {
public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

}
} Main
import java.util.*;
public class Main {
public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N,M;
    N=sc.nextInt();
    M=sc.nextInt();
    int [] num_road = new int[N];
    for(int a=0;a<M;a++){
        int a_city =sc.nextInt();
        int b_city =sc.nextInt();
        num_road[a_city-1]++;
        num_road[b_city-1]++;
    }
    for(int b=0;b<N;b++){
        System.out.println(num_road[b]);
    }

}
}
