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]);
		}

	}

}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz