#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int(i)=0;i<(n);i++)

int main(){
  int n,m,t;cin>>n>>m;
  vector<int> x(n,0);
  REP(i,m*2){
    cin>>t;
    x.at(t-1)++;
  }
  REP(i,n) cout<<x.at(i)<<endl;
}