#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m;
int vis[N];
int loc[N], a[N];
struct SegTree {
  int sgt[N * 4];
  void modify(int i, int b, int e, int x, int k) {
    if (b == e) {
      sgt[i] += k;
      return;
    }
    int mid = (b + e) >> 1, lc = i << 1, rc = lc | 1;
    if (x <= mid)
      modify(lc, b, mid, x, k);
    else
      modify(rc, mid + 1, e, x, k);
    sgt[i] = sgt[lc] + sgt[rc];
  }
  int query(int i, int b, int e, int x) {
    if (b == e) return b;
    int mid = (b + e) >> 1, lc = i << 1, rc = lc | 1;
    if (mid + sgt[rc] == x) {
      if (a[mid])
        return query(lc, b, mid, x - sgt[rc]);
      else
        return mid;
    } else if (mid + sgt[rc] < x)
      return query(rc, mid + 1, e, x);
    else
      return query(lc, b, mid, x - sgt[rc]);
  }
  int sum[N * 4], tag[N * 4];
  void pushdn(int i, int b, int e) {
    int mid = (b + e) >> 1, lc = i << 1, rc = lc | 1;
    tag[lc] += tag[i];
    tag[rc] += tag[i];
    sum[lc] += tag[i];
    sum[rc] += tag[i];
    tag[i] = 0;
  }
  void add(int i, int b, int e, int l, int r, int k) {
    if (r < b || e < l) return;
    if (l <= b && e <= r) {
      sum[i] += k;
      tag[i] += k;
      return;
    }
    pushdn(i, b, e);
    int mid = (b + e) >> 1, lc = i << 1, rc = lc | 1;
    add(lc, b, mid, l, r, k);
    add(rc, mid + 1, e, l, r, k);
    sum[i] = sum[lc] + sum[rc];
  }
  int query2(int i, int b, int e, int x) {
    if (b == e) return sum[i];
    pushdn(i, b, e);
    int mid = (b + e) >> 1, lc = i << 1, rc = lc | 1;
    if (x <= mid)
      return query2(lc, b, mid, x);
    else
      return query2(rc, mid + 1, e, x);
  }
} t;
int stk[N], top;
int main() {
  scanf("%d%d", &n, &m);
  int cnt = 0;
  for (long long i = (1); i <= (m); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (!vis[x]) {
      if (y <= cnt) {
        printf("-1");
        return 0;
      }
      int o = t.query(1, 1, n, y);
      t.modify(1, 1, n, o, 1);
      loc[x] = o;
      a[o] = x;
      cnt++;
    } else {
      int q = t.query2(1, 1, m, vis[x] + 1);
      if (q != y - 1) {
        printf("-1");
        return 0;
      }
      t.add(1, 1, m, 1, vis[x], -1);
    }
    t.add(1, 1, m, 1, i, 1);
    vis[x] = i;
  }
  for (long long i = (n); i >= (1); i--)
    if (loc[i]) {
    } else
      stk[++top] = i;
  for (long long i = (1); i <= (n); i++)
    if (!a[i]) a[i] = stk[top--];
  for (long long i = (1); i <= (n); i++) printf("%d ", a[i]);
}
