#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, tmp, ptr;
int tree[4000005], que[4000005], picked[1000005], ans[1000005], tail, pool;
bool pooled[1000005];
void init(int dex, int l, int r) {
  if (l + 1 == r) {
    tree[dex] = 1;
    return;
  }
  int mid = (l + r) / 2;
  init(dex << 1, l, mid);
  init(dex << 1 | 1, mid, r);
  tree[dex] = tree[dex << 1] + tree[dex << 1 | 1];
}
int query(int dex, int l, int r, int k) {
  tree[dex]--;
  if (l + 1 == r) return l;
  int mid = (l + r) / 2;
  if (tree[dex << 1] >= k)
    return query(dex << 1, l, mid, k);
  else
    return query(dex << 1 | 1, mid, r, k - tree[dex << 1]);
}
void qinsert(int dex, int l, int r, int k, int id) {
  que[dex]++;
  if (l + 1 == r) {
    picked[l] = id;
    return;
  }
  int mid = (l + r) / 2;
  if (k < mid)
    qinsert(dex << 1, l, mid, k, id);
  else
    qinsert(dex << 1 | 1, mid, r, k, id);
}
int qquery(int dex, int l, int r, int k) {
  if (!que[dex]) return -1;
  que[dex]--;
  if (l + 1 == r) return picked[l];
  int mid = (l + r) / 2;
  if (que[dex << 1] >= k)
    return qquery(dex << 1, l, mid, k);
  else
    return qquery(dex << 1 | 1, mid, r, k - que[dex << 1]);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  init(1, 1, n + 1);
  tail = n;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    if (y > pool) {
      if (pooled[x]) {
        cout << -1;
        return 0;
      }
      tmp = query(1, 1, n + 1, y - pool);
      ans[tmp] = x;
      pooled[x] = true;
      pool++;
      qinsert(1, 1, n + 1, tail--, x);
    } else {
      tmp = qquery(1, 1, n + 1, y);
      if (tmp != x) {
        cout << -1;
        return 0;
      }
      qinsert(1, 1, n + 1, tail--, x);
    }
  }
  ptr = 1;
  while (pooled[ptr]) ptr++;
  for (int i = 1; i <= n; i++) {
    if (ans[i])
      cout << ans[i];
    else {
      cout << ptr;
      pooled[ptr] = true;
    }
    while (pooled[ptr]) ptr++;
    cout << " ";
  }
  return 0;
}
