import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} Main public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } main {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } IOException | NumberFormatException e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } final Exception e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) List<String> firstRow = Arrays.asList(br.readLine().split(" ")); firstRow Arrays.asList(br.readLine().split(" ")) Arrays.asList Arrays br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int cityCount = Integer.parseInt(firstRow.get(0)); cityCount Integer.parseInt(firstRow.get(0)) Integer.parseInt Integer firstRow.get(0) firstRow.get firstRow 0 int pathCount = Integer.parseInt(firstRow.get(1)); pathCount Integer.parseInt(firstRow.get(1)) Integer.parseInt Integer firstRow.get(1) firstRow.get firstRow 1 List<Integer> pathList = new ArrayList<>(); pathList new ArrayList<>() for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            } int i = 0; int i = 0; i 0 i < pathCount i pathCount i++ i++ i {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            } {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            } List<String> inputRow = Arrays.asList(br.readLine().split(" ")); inputRow Arrays.asList(br.readLine().split(" ")) Arrays.asList Arrays br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " pathList.add(Integer.parseInt(inputRow.get(0))) pathList.add pathList Integer.parseInt(inputRow.get(0)) Integer.parseInt Integer inputRow.get(0) inputRow.get inputRow 0 pathList.add(Integer.parseInt(inputRow.get(1))) pathList.add pathList Integer.parseInt(inputRow.get(1)) Integer.parseInt Integer inputRow.get(1) inputRow.get inputRow 1 List<Integer> ansList = new ArrayList<>(); ansList new ArrayList<>() for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            } int i = 1; int i = 1; i 1 i <= cityCount i cityCount i++ i++ i {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            } {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            } ansList.add(0) ansList.add ansList 0 for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                } int j = 0; int j = 0; j 0 j < pathList.size() j pathList.size() pathList.size pathList j++ j++ j {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                } {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                } if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    } i == pathList.get(j) i pathList.get(j) pathList.get pathList j {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    } ansList.set(i - 1, ansList.get(i - 1) + 1) ansList.set ansList i - 1 i 1 ansList.get(i - 1) + 1 ansList.get(i - 1) ansList.get ansList i - 1 i 1 1 for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            } int i = 0; int i = 0; i 0 i < ansList.size() i ansList.size() ansList.size ansList i++ i++ i {
                System.out.println(ansList.get(i));
            } {
                System.out.println(ansList.get(i));
            } System.out.println(ansList.get(i)) System.out.println System.out System System.out ansList.get(i) ansList.get ansList i final String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));

            int cityCount = Integer.parseInt(firstRow.get(0));
            int pathCount = Integer.parseInt(firstRow.get(1));

            List<Integer> pathList = new ArrayList<>();
            for (int i = 0; i < pathCount; i++) {
                List<String> inputRow = Arrays.asList(br.readLine().split(" "));
                pathList.add(Integer.parseInt(inputRow.get(0)));
                pathList.add(Integer.parseInt(inputRow.get(1)));
            }

            List<Integer> ansList = new ArrayList<>();
            for (int i = 1; i <= cityCount; i++) {
                ansList.add(0);
                for (int j = 0; j < pathList.size(); j++) {
                    if (i == pathList.get(j)) {
                        ansList.set(i - 1, ansList.get(i - 1) + 1);
                    }
                }
            }

            for (int i = 0; i < ansList.size(); i++) {
                System.out.println(ansList.get(i));
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}