import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  } main {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int a[] = new int[M]; a new int[M] M int b[] = new int[M]; b new int[M] M for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    } {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    } a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan int load[] = new int[N]; load new int[N] N for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    } {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    } for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      } {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      } if(a[i] == j+1 ) {
          load[j]++;
        } a[i] == j+1 a[i] a i j+1 j 1 {
          load[j]++;
        } load[j]++ load[j] load j if (b[i] == j+1) {
          load[j]++;
        } b[i] == j+1 b[i] b i j+1 j 1 {
          load[j]++;
        } load[j]++ load[j] load j for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      System.out.println(load[i]);
    } {
      System.out.println(load[i]);
    } System.out.println(load[i]) System.out.println System.out System System.out load[i] load i String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
	int M = scan.nextInt();
    int a[] = new int[M];
    int b[] = new int[M];
    for (int i = 0; i < M; i++) {
      a[i] = scan.nextInt();
      b[i] = scan.nextInt();
    }
    int load[] = new int[N];
    for (int i = 0; i < M; i++) {
      for (int j = 0; j < N; j++) {
        if(a[i] == j+1 ) {
          load[j]++;
        }
        if (b[i] == j+1) {
          load[j]++;
        }
      }
    }
    for (int i = 0; i < N; i++) {
      System.out.println(load[i]);
    }
  }
}