import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 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++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    } int i=0; int i=0; i 0 i<m i m i++ i++ i {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    } {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    } str = in.readLine().split(" ") str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " a[i] = Integer.parseInt(str[0]) a[i] a i Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 b[i] = Integer.parseInt(str[1]) b[i] b i Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int[] count = new int[n]; count new int[n] n for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    } int i=0; int i=0; i 0 i<m i m i++ i++ i {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    } {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    } for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      } int j=1; int j=1; j 1 j<=n j n j++ j++ j {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      } {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      } if(a[i] == j)
          count[j-1]+=1; a[i] == j a[i] a i j count[j-1]+=1 count[j-1] count j-1 j 1 1 if(b[i] == j)
          count[j-1]+=1; b[i] == j b[i] b i j count[j-1]+=1 count[j-1] count j-1 j 1 1 for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      System.out.println(count[i]);
    } {
      System.out.println(count[i]);
    } System.out.println(count[i]) System.out.println System.out System System.out count[i] count i String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int[] a = new int[m];
    int[] b = new int[m];
    for(int i=0; i<m; i++) {
      str = in.readLine().split(" ");
      a[i] = Integer.parseInt(str[0]);
      b[i] = Integer.parseInt(str[1]);
    }
    
    int[] count = new int[n];
    for(int i=0; i<m; i++) {
      for(int j=1; j<=n; j++) {
        if(a[i] == j)
          count[j-1]+=1;
        if(b[i] == j)
          count[j-1]+=1;
      }
    }
    
    for(int i=0; i<n; i++) {
      System.out.println(count[i]);
    }
  }
}