#include <bits/stdc++.h>
using namespace std;
struct Node {
  int pr, num, sz;
  Node *left, *right;
  Node(int num) : num(num), sz(1), left(nullptr), right(nullptr) {
    pr = (rand() << 16) ^ rand();
  }
};
void update(Node*& v) {
  if (v)
    v->sz = 1 + (v->left ? v->left->sz : 0) + (v->right ? v->right->sz : 0);
}
ostream& operator<<(ostream& out, Node* t) {
  if (t) {
    update(t);
    out << t->left << t->num << " " << t->right;
  }
  return out;
}
Node* merge(Node*& l, Node*& r) {
  if (!l || !r) return (l ? l : r);
  if (l->pr > r->pr) {
    l->right = merge(l->right, r);
    update(l);
    return l;
  } else {
    r->left = merge(l, r->left);
    update(r);
    return r;
  }
}
void split(Node* v, Node*& left, Node*& right, int id) {
  if (!v) {
    left = right = nullptr;
    return;
  }
  update(v);
  if ((v->left ? v->left->sz : 0) < id) {
    split(v->right, v->right, right, id - (v->left ? v->left->sz : 0) - 1);
    update(v);
    left = v;
    return;
  }
  if ((v->left ? v->left->sz : 0) >= id) {
    split(v->left, left, v->left, id);
    update(v);
    right = v;
    return;
  }
}
Node* insert(Node*& v, Node*& newNode, int id) {
  if (!v) return newNode;
  if (newNode->pr < v->pr && id <= (v->left ? v->left->sz : 0)) {
    v->left = insert(v->left, newNode, id);
    update(v);
    return v;
  }
  if (newNode->pr < v->pr) {
    v->right = insert(v->right, newNode, id - 1 - (v->left ? v->left->sz : 0));
    update(v);
    return v;
  }
  Node *l, *r;
  split(v, l, r, id);
  newNode->left = l, newNode->right = r;
  update(newNode);
  return newNode;
}
Node* erase(Node*& v, int id) {
  if (v == nullptr) return v;
  if ((v->left ? v->left->sz : 0) == id) {
    Node* ans = merge(v->left, v->right);
    delete v;
    return ans;
  }
  if ((v->left ? v->left->sz : 0) < id) {
    v->right = erase(v->right, id - 1 - (v->left ? v->left->sz : 0));
    update(v);
    return v;
  }
  if ((v->left ? v->left->sz : 0) > id) {
    v->left = erase(v->left, id);
    update(v);
    return v;
  }
}
Node* getNode(Node* v, int id) {
  if (v == nullptr) return v;
  if ((v->left ? v->left->sz : 0) == id)
    return v;
  else if ((v->left ? v->left->sz : 0) < id)
    return getNode(v->right, id - 1 - (v->left ? v->left->sz : 0));
  else
    return getNode(v->left, id);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  bool chek = false;
  Node* root = nullptr;
  int n, m;
  cin >> n >> m;
  vector<int> numberUsed(n + 1, 0);
  vector<pair<int, int>> q(m);
  for (int i = 0; i < n; i++) {
    Node* temp = new Node(-1);
    root = insert(root, temp, (root ? root->sz : 0));
  }
  for (int i = 0; i < m; i++) cin >> q[m - i - 1].first >> q[m - i - 1].second;
  for (int i = 0; i < m; i++) {
    int nowNum = q[i].first, pos = q[i].second, front = getNode(root, 0)->num;
    if (numberUsed[nowNum] == 1 && front != nowNum)
      chek = true;
    else if (numberUsed[nowNum] == 0 && front != nowNum && front != -1)
      chek = true;
    numberUsed[nowNum] = 1;
    Node* a = new Node(nowNum);
    root = insert(root, a, pos);
    root = erase(root, 0);
  }
  if (!chek) {
    queue<int> remains;
    for (int i = 1; i <= n; i++)
      if (numberUsed[i] == 0) remains.push(i);
    for (int i = 0; i < n; i++) {
      int now = getNode(root, i)->num;
      if (now == -1) {
        cout << remains.front() << " ";
        remains.pop();
      } else
        cout << now << " ";
    }
  } else
    cout << "-1";
}
