#include <bits/stdc++.h>
using namespace std;
const int N = 1000006;
int seg[N << 3], M, value[N << 3], D = 1e6;
int stk[N];
int ans[N];
int hs[N];
int n, m;
int work(int v, int p, int np) {
  int i;
  for (i = 1; i < M;) {
    if (seg[i << 1] >= p) {
      i = i << 1;
    } else {
      p -= seg[i << 1];
      i = i << 1 | 1;
    }
  }
  if (value[i] == 0) {
    value[i] = v;
    if (hs[v] != 0) return 0;
  }
  if (hs[v] == 0) {
    hs[v] = i - (M + D);
    ans[hs[v]] = v;
  }
  if (value[i] == v) {
    value[i] = -1;
    value[np] = v;
    int pp = i;
    while (pp >= 1) {
      seg[pp]--;
      pp /= 2;
    }
    pp = np;
    while (pp >= 1) {
      seg[pp]++;
      pp /= 2;
    }
    return 1;
  } else {
    return 0;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 30; i >= 0; i--)
    if ((1 << i) >= D + n + 2) M = 1 << i;
  for (int i = 1; i <= n; i++) seg[i + M + D] = 1;
  for (int i = M - 1; i >= 1; i--) {
    seg[i] = seg[i * 2] + seg[i * 2 + 1];
  }
  for (int i = 0; i < m; i++) {
    int v, p;
    scanf("%d%d", &v, &p);
    if (0 == work(v, p, M + D - i)) {
      cout << -1 << endl;
      return 0;
    }
  }
  int now = 0;
  for (int i = 1; i <= n; i++)
    if (0 == ans[i]) {
      now++;
      while (hs[now] && now <= n) {
        now++;
      }
      ans[i] = now;
    }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  cout << endl;
}
