import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  }

} import java.util.*; util.* java public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  } main {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int[] a = new int[M]; a new int[M] M int[] b = new int[M]; b new int[M] M int[][] road = new int[N][N]; road new int[N][N] N N for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    } {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    } a[i] = sc.nextInt() - 1 a[i] a i sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 b[i] = sc.nextInt() - 1 b[i] b i sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 road[a[i]][b[i]]++ road[a[i]][b[i]] road[a[i]] road a[i] a i b[i] b i sc.close() sc.close sc for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    } {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    } int count = 0; count 0 for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      } {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      } 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] count road[i][j] road[i] road i j if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        } road[j][i] != 0 && j != i road[j][i] != 0 road[j][i] road[j] road j i 0 j != i j i {
          count += road[j][i];
        } count += road[j][i] count road[j][i] road[j] road j i System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  }

} Main
import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    int[][] road = new int[N][N];

    for (int i = 0; i < M; i++) {
      a[i] = sc.nextInt() - 1;
      b[i] = sc.nextInt() - 1;
      road[a[i]][b[i]]++;
    }

    sc.close();

    for (int i = 0; i < N; i++) {
      int count = 0;
      for (int j = 0; j < N; j++) {
        if (road[i][j] != 0) {
          count += road[i][j];
        }
        if (road[j][i] != 0 && j != i) {
          count += road[j][i];
        }
      }
      System.out.println(count);
    }

  }

}