#include <bits/stdc++.h>
using namespace std;
bool u[1000002];
vector<int> answer;
struct node {
  int value, cnt, prior;
  node *l, *r;
  node() {
    this->l = this->r = NULL;
    this->value = -1;
    this->cnt = 1;
    this->prior = rand();
  }
};
int cnt(node *t) { return t == NULL ? 0 : t->cnt; }
void upd_cnt(node *t) {
  if (t == NULL) return;
  t->cnt = 1 + cnt(t->l) + cnt(t->r);
}
void split(node *t, node *&l, node *&r, const int &key, const int &add = 0) {
  if (t == NULL) {
    l = r = NULL;
    return;
  }
  int curr = add + cnt(t->l);
  if (curr >= key) {
    split(t->l, l, t->l, key, add);
    r = t;
  } else {
    split(t->r, t->r, r, key, 1 + add + cnt(t->l));
    l = t;
  }
  upd_cnt(t);
}
void merge(node *&t, node *l, node *r) {
  if (!l || !r) {
    t = l == NULL ? r : l;
    upd_cnt(t);
    return;
  }
  if (l->prior > r->prior) {
    merge(l->r, l->r, r);
    t = l;
  } else {
    merge(r->l, l, r->l);
    t = r;
  }
  upd_cnt(t);
}
void output(node *t) {
  if (t == NULL) return;
  output(t->l);
  answer.push_back(t->value);
  if (t->value != -1 && u[t->value]) {
    printf("-1\n");
    exit(0);
  }
  u[t->value] = true;
  output(t->r);
}
int main() {
  srand((unsigned)time(NULL));
  vector<pair<int, int> > a;
  node *root = NULL, *t1, *t2, *t3;
  int n, m, x, y, now = 1;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    merge(root, root, new node());
  }
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &x, &y);
    a.push_back(make_pair(x, y));
  }
  for (int i = m - 1; i >= 0; i--) {
    x = a[i].first;
    y = a[i].second;
    split(root, t1, t3, y);
    split(t1, t1, t2, 1);
    if (t1->value == -1)
      t1->value = x;
    else if (t1->value != x) {
      printf("-1\n");
      return 0;
    }
    merge(root, t2, t1);
    merge(root, root, t3);
  }
  output(root);
  for (int i = 0; i < answer.size(); i++) {
    while (u[now]) now++;
    if (answer[i] == -1) {
      answer[i] = now;
      u[now] = true;
    }
    printf("%d ", answer[i]);
  }
  printf("\n");
}
