import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	}

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	} main {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) boolean first = true; first true int[] city=null; city null int maxNum = 0; maxNum 0 int loop = 1; loop 1 int num=0; num 0 while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		} in.hasNext() in.hasNext in {
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		} String[] str = in.nextLine().split(" ",0); str in.nextLine().split(" ",0) in.nextLine().split in.nextLine() in.nextLine in " " 0 if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			} first {
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			} num = Integer.parseInt(str[0]) num Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 city = new int[num] city new int[num] num maxNum = Integer.parseInt(str[1]) maxNum Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 first = false first false {
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			} int left = Integer.parseInt(str[0]); left Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int right = Integer.parseInt(str[1]); right Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 city[left-1] ++ city[left-1] city left-1 left 1 city[right-1]++ city[right-1] city right-1 right 1 loop++ loop if(loop == maxNum+1){
				break;
			} loop == maxNum+1 loop maxNum+1 maxNum 1 {
				break;
			} break; for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		} int i=0 ; int i=0 ; i 0 i<num i num i++ i++ i {
			System.out.println(city[i]);
		} {
			System.out.println(city[i]);
		} System.out.println(city[i]) System.out.println System.out System System.out city[i] city i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean first = true;
		int[] city=null;
		int maxNum = 0;
		int loop = 1;
		int num=0;
		while(in.hasNext()){
			String[] str = in.nextLine().split(" ",0);
			if(first){
				num = Integer.parseInt(str[0]);
				city = new int[num];
				maxNum = Integer.parseInt(str[1]);
				first = false;
			}else{
				int left = Integer.parseInt(str[0]);
				int right = Integer.parseInt(str[1]);
				city[left-1] ++;
				city[right-1]++;
				loop++;
			}
			if(loop == maxNum+1){
				break;
			}

		}
		for(int i=0 ; i<num;i++){
			System.out.println(city[i]);
		}

	}

}