import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		int table[][] = new int[N+2][N+2];
		for(int i=0;i<M;i++) {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		}

		for(int i=1;i<=N;i++) {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		}
	}
} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		int table[][] = new int[N+2][N+2];
		for(int i=0;i<M;i++) {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		}

		for(int i=1;i<=N;i++) {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		}
	}
} Main public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		int table[][] = new int[N+2][N+2];
		for(int i=0;i<M;i++) {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		}

		for(int i=1;i<=N;i++) {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		}
	} main {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		int table[][] = new int[N+2][N+2];
		for(int i=0;i<M;i++) {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		}

		for(int i=1;i<=N;i++) {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int M = in.nextInt(); M in.nextInt() in.nextInt in int table[][] = new int[N+2][N+2]; table new int[N+2][N+2] N+2 N 2 N+2 N 2 for(int i=0;i<M;i++) {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		} {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		} int ai = in.nextInt(); ai in.nextInt() in.nextInt in int bi = in.nextInt(); bi in.nextInt() in.nextInt in table[ai][bi] += 1 table[ai][bi] table[ai] table ai bi 1 table[bi][ai] += 1 table[bi][ai] table[bi] table bi ai 1 for(int i=1;i<=N;i++) {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		} {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		} int ans = 0; ans 0 for(int j=1;j<=N;j++) {
				ans += table[i][j];
			} int j=1; int j=1; j 1 j<=N j N j++ j++ j {
				ans += table[i][j];
			} {
				ans += table[i][j];
			} ans += table[i][j] ans table[i][j] table[i] table i j System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		int table[][] = new int[N+2][N+2];
		for(int i=0;i<M;i++) {
			int ai = in.nextInt();
			int bi = in.nextInt();
			table[ai][bi] += 1;
			table[bi][ai] += 1;
		}

		for(int i=1;i<=N;i++) {
			int ans = 0;
			for(int j=1;j<=N;j++) {
				ans += table[i][j];
			}
			System.out.println(ans);
		}
	}
}