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[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    }
} 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[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    } main {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    } 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[] road = new int[N+1]; road new int[N+1] N+1 N 1 for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	} {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	} road[sc.nextInt()]++ road[sc.nextInt()] road sc.nextInt() sc.nextInt sc road[sc.nextInt()]++ road[sc.nextInt()] road sc.nextInt() sc.nextInt sc StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
    		sb.append(road[i] + "\n");
    	} {
    		sb.append(road[i] + "\n");
    	} sb.append(road[i] + "\n") sb.append sb road[i] + "\n" road[i] road i "\n" System.out.println(sb) System.out.println System.out System System.out sb 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[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    }
} public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    }
} 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[] road = new int[N+1];
    	for (int i = 0; i < M; i++) {
    		road[sc.nextInt()]++;
    		road[sc.nextInt()]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 1; i < N+1; i++) {
    		sb.append(road[i] + "\n");
    	}
    	System.out.println(sb);
    }
}