import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  }

  private static class Node {
    private List<Node> adjacent = new ArrayList<>();
  }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  }

  private static class Node {
    private List<Node> adjacent = new ArrayList<>();
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  } main {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner Node[] nodes = new Node[N]; nodes new Node[N] N for (int i = 0; i < N; i++) nodes[i] = new Node(); int i = 0; int i = 0; i 0 i < N i N i++ i++ i nodes[i] = new Node(); nodes[i] = new Node() nodes[i] nodes i new Node() int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    } {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    } int a = scanner.nextInt() - 1; a scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 int b = scanner.nextInt() - 1; b scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 nodes[a].adjacent.add(nodes[b]) nodes[a].adjacent.add nodes[a].adjacent nodes[a] nodes a nodes[a].adjacent nodes[b] nodes b nodes[b].adjacent.add(nodes[a]) nodes[b].adjacent.add nodes[b].adjacent nodes[b] nodes b nodes[b].adjacent nodes[a] nodes a for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size()); int i = 0; int i = 0; i 0 i < N i N i++ i++ i System.out.println(nodes[i].adjacent.size()); System.out.println(nodes[i].adjacent.size()) System.out.println System.out System System.out nodes[i].adjacent.size() nodes[i].adjacent.size nodes[i].adjacent nodes[i] nodes i nodes[i].adjacent String[] args args private static class Node {
    private List<Node> adjacent = new ArrayList<>();
  } Node private List<Node> adjacent = new ArrayList<>(); adjacent new ArrayList<>() public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  }

  private static class Node {
    private List<Node> adjacent = new ArrayList<>();
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  }

  private static class Node {
    private List<Node> adjacent = new ArrayList<>();
  }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    Node[] nodes = new Node[N];
    for (int i = 0; i < N; i++) nodes[i] = new Node();
    int M = scanner.nextInt();
    for (int i = 0; i < M; i++) {
      int a = scanner.nextInt() - 1;
      int b = scanner.nextInt() - 1;
      nodes[a].adjacent.add(nodes[b]);
      nodes[b].adjacent.add(nodes[a]);
    }
    for (int i = 0; i < N; i++) System.out.println(nodes[i].adjacent.size());
  }

  private static class Node {
    private List<Node> adjacent = new ArrayList<>();
  }
}
