/*  -*- coding: utf-8 -*-
 *
 * 1369.cc: Distribution Center
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 200000;
const int MAX_M = 100000;

/* typedef */

typedef pair<int,int> pii;

/* global variables */

pii ps[MAX_M];
int ls[MAX_N], rs[MAX_N];

/* subroutines */

/* main */

int main() {
  int n, m;
  scanf("%d%d", &n, &m);

  for (int i = 0; i < m; i++)
    scanf("%d%d", &ps[i].first, &ps[i].second);
  sort(ps, ps + m);

  for (int i = 0; i < n; i++) ls[i] = i, rs[i] = i + 1;

  for (int i = 0; i < m; i++) {
    int i1 = ps[i].second, i0 = i1 - 1;
    ls[i1] = ls[i0];
    rs[i0] = rs[i1];
  }

  for (int i = 0; i < n; i++) {
    if (i) putchar(' ');
    printf("%d", rs[i] - ls[i]);
  }
  putchar('\n');
  return 0;
}


### Prompt

Generate a Cpp solution to the following problem:

Example

Input

4 3
1000 1
2000 2
3000 3


Output

2 3 4 4

### Response

```cpp
/*  -*- coding: utf-8 -*-
 *
 * 1369.cc: Distribution Center
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 200000;
const int MAX_M = 100000;

/* typedef */

typedef pair<int,int> pii;

/* global variables */

pii ps[MAX_M];
int ls[MAX_N], rs[MAX_N];

/* subroutines */

/* main */

int main() {
  int n, m;
  scanf("%d%d", &n, &m);

  for (int i = 0; i < m; i++)
    scanf("%d%d", &ps[i].first, &ps[i].second);
  sort(ps, ps + m);

  for (int i = 0; i < n; i++) ls[i] = i, rs[i] = i + 1;

  for (int i = 0; i < m; i++) {
    int i1 = ps[i].second, i0 = i1 - 1;
    ls[i1] = ls[i0];
    rs[i0] = rs[i1];
  }

  for (int i = 0; i < n; i++) {
    if (i) putchar(' ');
    printf("%d", rs[i] - ls[i]);
  }
  putchar('\n');
  return 0;
}


```