#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}

int main () {
  cin.tie(0);
  cout << fixed << setprecision(10);

  int n, m; cin >> n >> m;
  vector<pair<int, int>> p(m);
  for(int i=0;i<m;++i) {
    cin >> p[i].first >> p[i].second;
    p[i].second--;
  }

  sort(p.begin(), p.end());

  vector<int> l(n), r(n);
  for(int i=0;i<n;++i) {
    l[i] = i;
    r[i] = i;
  }

  for(int i=0;i<m;++i) {
    int y = p[i].second;
    r[y] = r[y+1];
    l[y+1] = l[y];
  }

  for(int i=0;i<n;++i) {
    cout << r[i] - l[i] + 1;
    if(i == n-1) cout << endl;
    else cout << " " ;
  }
}

