import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} Main public static void main(String[] args) throws Exception {
        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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    } 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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    } 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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        } int i=0; int i=0; i 0 i<a.length i a.length a a.length 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 count=0; count 0 for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        } {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        } count=0 count 0 for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            } int j=0; int j=0; j 0 j<a.length j a.length a a.length j++ j++ j {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            } {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            } if(a[j]==i+1)
                {
                    count++;
                } a[j]==i+1 a[j] a j i+1 i 1 {
                    count++;
                } count++ count if(b[j]==i+1)
                {
                    count++;
                } b[j]==i+1 b[j] b j i+1 i 1 {
                    count++;
                } count++ count 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) throws Exception {
        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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        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<a.length;i++)
        {
            a[i] = scan.nextInt();
            b[i] = scan.nextInt();
        }
        
        int count=0;
        for(int i=0;i<n;i++)
        {
            count=0;
            for(int j=0;j<a.length;j++)
            {
                if(a[j]==i+1)
                {
                    count++;
                }
                if(b[j]==i+1)
                {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}