public class Main{

	public static void main(String[] args) {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	}

} public class Main{

	public static void main(String[] args) {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	}

} Main public static void main(String[] args) {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	} main {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	} java.util.Scanner scanner = new java.util.Scanner (System.in); scanner new java.util.Scanner (System.in) int N=scanner.nextInt() ; N scanner.nextInt() scanner.nextInt scanner int M=scanner.nextInt() ; M scanner.nextInt() scanner.nextInt scanner int a[]=new int[M+1]; a new int[M+1] M+1 M 1 int b[]=new int[M+1]; b new int[M+1] M+1 M 1 for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		} int i=1; int i=1; i 1 i<=M i M i++ i++ i {
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		} {
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		} a[i]=scanner.nextInt() a[i] a i scanner.nextInt() scanner.nextInt scanner b[i]=scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		} {
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		} int sum=0; sum 0 for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			} int p=1; int p=1; p 1 p<=M p M p++ p++ p {
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			} {
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			} if(a[p]==i||b[p]==i){
					sum+=1;
				} a[p]==i||b[p]==i a[p]==i a[p] a p i b[p]==i b[p] b p i {
					sum+=1;
				} sum+=1 sum 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main{

	public static void main(String[] args) {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	}

} public class Main{

	public static void main(String[] args) {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	}

} Main
public class Main{

	public static void main(String[] args) {
		java.util.Scanner scanner = new java.util.Scanner (System.in);
		int N=scanner.nextInt() ;

		int M=scanner.nextInt() ;
		
		int a[]=new int[M+1];
		int b[]=new int[M+1];
		
		for(int i=1;i<=M;i++){
			a[i]=scanner.nextInt() ;

			b[i]=scanner.nextInt() ;
		}
		
		for(int i=1;i<=N;i++){
			int sum=0;
			for(int p=1;p<=M;p++){
				if(a[p]==i||b[p]==i){
					sum+=1;
				}
			}
			System.out.println(sum);
			
		}
		
	}

}