#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int main(void)
{
  int n,m;
  cin >> n >> m;
  vector<pair<int,int>> c(m);
  REP(i,m) cin >> c[i].first >> c[i].second;
  SORT(c);
  vector<int> mi(n),ma(n);
  REP(i,n) mi[i]=i;
  REP(i,n) ma[i]=i;
  REP(i,m){
    mi[c[i].second]=mi[c[i].second-1];
    ma[c[i].second-1]=ma[c[i].second];
  }
  REP(i,n){
   if(i) cout << " ";
   cout << ma[i]-mi[i]+1;
  }
  cout << endl;
  return 0;
}