#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;

#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define fi first
#define se second

#define INF 2147483600
typedef pair<int, int> P;

int main(){
  int n,m;
  cin>>n>>m;
  vector<P> vec(n);
  rep(i,n) vec[i] = mp(i,i);
  vector<P> mac(m);
  rep(i,m){
    int a,b;
    scanf("%d %d", &a, &b);
    mac[i] = mp(a,--b);
  }

  sort(all(mac));

  for(auto p : mac){
    int d = p.se;
    vec[d].se = vec[d+1].se;
    vec[d+1].fi=vec[d].fi;
  }

  rep(i,n){
    printf("%d%c", vec[i].se-vec[i].fi+1, ((i==n-1)?'\n':' '));
  }

  return 0;
}
### Prompt

Your task is to create a CPP solution to the following problem:

Example

Input

4 3
1000 1
2000 2
3000 3


Output

2 3 4 4

### Response

```cpp
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;

#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define fi first
#define se second

#define INF 2147483600
typedef pair<int, int> P;

int main(){
  int n,m;
  cin>>n>>m;
  vector<P> vec(n);
  rep(i,n) vec[i] = mp(i,i);
  vector<P> mac(m);
  rep(i,m){
    int a,b;
    scanf("%d %d", &a, &b);
    mac[i] = mp(a,--b);
  }

  sort(all(mac));

  for(auto p : mac){
    int d = p.se;
    vec[d].se = vec[d+1].se;
    vec[d+1].fi=vec[d].fi;
  }

  rep(i,n){
    printf("%d%c", vec[i].se-vec[i].fi+1, ((i==n-1)?'\n':' '));
  }

  return 0;
}
```