import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		new Main().solve();
	}
	int m,n;
	void solve(){
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		new Main().solve();
	}
	int m,n;
	void solve(){
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	}
} Main int m m n; n public static void main(String[] args) {
		new Main().solve();
	} main {
		new Main().solve();
	} new Main().solve() new Main().solve new Main() String[] args args void solve(){
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	} solve {
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) n=sc.nextInt() n sc.nextInt() sc.nextInt sc m=sc.nextInt() m sc.nextInt() sc.nextInt sc int[][] road=new int[n+1][n+1]; road new int[n+1][n+1] n+1 n 1 n+1 n 1 for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		} {
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		} int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc road[a][b]++ road[a][b] road[a] road a b road[b][a]++ road[b][a] road[b] road b a for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		} {
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		} int count=0; count 0 for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			} int j=1; int j=1; j 1 j<=n j n j++ j++ j {
				if(road[i][j]>0)count+=road[i][j];
			} {
				if(road[i][j]>0)count+=road[i][j];
			} if(road[i][j]>0)count+=road[i][j]; road[i][j]>0 road[i][j] road[i] road i j 0 count+=road[i][j] count road[i][j] road[i] road i j System.out.println(count) System.out.println System.out System System.out count public class Main {

	public static void main(String[] args) {
		new Main().solve();
	}
	int m,n;
	void solve(){
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	}
} public class Main {

	public static void main(String[] args) {
		new Main().solve();
	}
	int m,n;
	void solve(){
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		new Main().solve();
	}
	int m,n;
	void solve(){
		Scanner sc=new Scanner(System.in);
		n=sc.nextInt();
		m=sc.nextInt();
		int[][] road=new int[n+1][n+1];
		for(int i=0;i<m;i++){
			int a=sc.nextInt();
			int b=sc.nextInt();
			road[a][b]++;
			road[b][a]++;
		}
		for(int i=1;i<=n;i++){
			int count=0;
			for(int j=1;j<=n;j++){
				if(road[i][j]>0)count+=road[i][j];
			}
			System.out.println(count);
		}
		
	}
}
