#include <bits/stdc++.h>
using namespace std;
template <typename TK, typename TV>
struct node {
  int priority;
  TK key;
  TV value;
  size_t size;
  node<TK, TV>* left;
  node<TK, TV>* right;
  node(const int& priority, const TK& key = TK(), const TV& value = TV(),
       node<TK, TV>* left = nullptr, node<TK, TV>* right = nullptr)
      : priority(priority),
        key(key),
        value(value),
        size(1),
        left(left),
        right(right) {}
  node() : node(rand()) {}
};
template <typename TV>
struct node<void, TV> {
  int priority;
  TV value;
  size_t size;
  node<void, TV>* left;
  node<void, TV>* right;
  node(const int& priority, const TV& value = TV(),
       node<void, TV>* left = nullptr, node<void, TV>* right = nullptr)
      : priority(priority), value(value), size(1), left(left), right(right) {}
  node() : node(rand()) {}
};
template <typename TK, typename TV>
size_t subtree_size(node<TK, TV>* t) {
  return (t == nullptr ? 0 : t->size);
}
template <typename TK, typename TV>
void update(node<TK, TV>* t) {
  if (t != nullptr) {
    t->size = subtree_size(t->left) + subtree_size(t->right) + 1;
  }
}
template <typename TK, typename TV>
void split(node<TK, TV>* t, const TK& key, node<TK, TV>*& left,
           node<TK, TV>*& right) {
  if (t == nullptr) {
    left = nullptr;
    right = nullptr;
  } else if (key < t->key) {
    split(t->left, key, left, t->left);
    right = t;
  } else {
    split(t->right, key, t->right, right);
    left = t;
  }
  update(t);
}
template <typename TV>
void split(node<void, TV>* t, const size_t& key, node<void, TV>*& left,
           node<void, TV>*& right, const size_t& add = 0) {
  if (t == nullptr) {
    left = nullptr;
    right = nullptr;
  } else if (key <= add + subtree_size(t->left)) {
    split(t->left, key, left, t->left, add);
    right = t;
  } else {
    split(t->right, key, t->right, right, add + 1 + subtree_size(t->left));
    left = t;
  }
  update(t);
}
template <typename TK, typename TV>
void merge(node<TK, TV>*& t, node<TK, TV>* left, node<TK, TV>* right) {
  if (left == nullptr) {
    t = right;
  } else if (right == nullptr) {
    t = left;
  } else if (left->priority > right->priority) {
    merge(left->right, left->right, right);
    t = left;
  } else {
    merge(right->left, left, right->left);
    t = right;
  }
  update(t);
}
template <typename TK, typename TV>
class treap {
 public:
  treap(const size_t& capacity = 131072U, bool genPrios = true)
      : _cap(capacity) {
    _data = new node<TK, TV>[_cap];
    if (genPrios) {
      int* _prio = new int[_cap];
      for (int i = 0; i < _cap; ++i) {
        _prio[i] = i;
      }
      random_shuffle(_prio, _prio + _cap);
      for (size_t i = 0; i < _cap; ++i) {
        _data[i] = node<TK, TV>(_prio[i]);
      }
      delete[](_prio);
    }
  }
  ~treap() { delete[](_data); }
  size_t capacity() { return _cap; }
  node<TK, TV>*& root() { return _root; }
  node<TK, TV>* data() { return _data; };
  size_t size() { return _cnt; }
  node<TK, TV>* find(const TK& key) { return find_recursive(key, _root); }
  node<TK, TV>* insert(const TK& key, const TV& value) {
    node<TK, TV>* res = find(key);
    if (res != nullptr) {
      res->value = value;
      return res;
    } else {
      _data[_cur].key = key;
      _data[_cur].value = value;
      insert_recursive(_root, &_data[_cur]);
      _cnt++;
      return &_data[_cur++];
    }
  }
  node<TK, TV>* erase(const TK& key) {
    node<TK, TV>* res = find(key);
    if (res == nullptr) {
      return nullptr;
    } else {
      _cnt--;
      return erase_recursive(_root, key);
    }
  }

 private:
  size_t _cap{0};
  size_t _cur{0};
  size_t _cnt{0};
  node<TK, TV>* _data{nullptr};
  node<TK, TV>* _root{nullptr};
  node<TK, TV>* find_recursive(const TK& key, node<TK, TV>* t) {
    if (t == nullptr) {
      return nullptr;
    } else if (key < t->key) {
      return find_recursive(key, t->left);
    } else if (key > t->key) {
      return find_recursive(key, t->right);
    } else {
      return t;
    }
  }
  void insert_recursive(node<TK, TV>*& t, node<TK, TV>* item) {
    if (t == nullptr) {
      t = item;
    } else if (item->priority > t->priority) {
      split(t, item->key, item->left, item->right);
      t = item;
    } else {
      insert_recursive(item->key < t->key ? t->left : t->right, item);
    }
    update(t);
  }
  node<TK, TV>* erase_recursive(node<TK, TV>*& t, const TK& key) {
    node<TK, TV>* tmp;
    if (key == t->key) {
      tmp = t;
      merge(t, t->left, t->right);
    } else {
      tmp = erase_recursive(key < t->key ? t->left : t->right, key);
      update(t);
    }
    return tmp;
  }
};
template <typename TV>
class treap<void, TV> {
 public:
  treap(const size_t& capacity = 131072U, bool genPrios = true)
      : _cap(capacity) {
    _data = new node<void, TV>[_cap];
    if (genPrios) {
      int* _prio = new int[_cap];
      for (int i = 0; i < _cap; ++i) {
        _prio[i] = i;
      }
      random_shuffle(_prio, _prio + _cap);
      for (size_t i = 0; i < _cap; ++i) {
        _data[i] = node<void, TV>(_prio[i]);
      }
      delete[](_prio);
    }
  }
  ~treap() { delete[](_data); }
  size_t capacity() { return _cap; }
  node<void, TV>*& root() { return _root; }
  node<void, TV>* data() { return _data; };
  size_t size() { return _cnt; }
  node<void, TV>* find(const size_t& key) { return find_recursive(key, _root); }
  node<void, TV>* insert(const size_t& key, const TV& value) {
    node<void, TV>* res = find(key);
    if (res != nullptr) {
      res->value = value;
      return res;
    } else {
      _data[_cur].value = value;
      insert_recursive(key, _root, &_data[_cur]);
      _cnt++;
      return &_data[_cur++];
    }
  }
  node<void, TV>* erase(const size_t& key) {
    node<void, TV>* res = find(key);
    if (res == nullptr) {
      return nullptr;
    } else {
      _cnt--;
      return erase_recursive(_root, key);
    }
  }
  void output(int* m1, int* m2, node<void, TV>* t) {
    if (t != nullptr) {
      if (t->value.first != -1) {
        if (m1[t->value.second] || m2[t->value.first]) {
          printf("-1\n");
          exit(0);
        } else {
          m1[t->value.second] = t->value.first;
          m2[t->value.first] = t->value.second;
        }
      }
      output(m1, m2, t->left);
      output(m1, m2, t->right);
    }
  }

 private:
  size_t _cap{0};
  size_t _cur{0};
  size_t _cnt{0};
  node<void, TV>* _data{nullptr};
  node<void, TV>* _root{nullptr};
  node<void, TV>* find_recursive(const size_t& key, node<void, TV>* t,
                                 const size_t& add = 0) {
    if (t == nullptr) {
      return nullptr;
    }
    size_t cur_key = 1 + add + subtree_size(t->left);
    if (key < cur_key) {
      return find_recursive(key, t->left, add);
    } else if (key > cur_key) {
      return find_recursive(key, t->right, cur_key);
    } else {
      return t;
    }
  }
  void insert_recursive(const size_t& key, node<void, TV>*& t,
                        node<void, TV>* item, const size_t& add = 0) {
    if (t == nullptr) {
      t = item;
    } else if (item->priority > t->priority) {
      split(t, key, item->left, item->right);
      t = item;
    } else {
      size_t cur_key = 1 + add + subtree_size(t->left);
      if (key < cur_key) {
        insert_recursive(key, t->left, item, add);
      } else {
        insert_recursive(key, t->right, item, cur_key);
      }
    }
    update(t);
  }
  node<void, TV>* erase_recursive(node<void, TV>*& t, const size_t& key,
                                  const size_t& add = 0) {
    node<void, TV>* tmp;
    size_t cur_key = 1 + add + subtree_size(t->left);
    if (key == cur_key) {
      tmp = t;
      merge(t, t->left, t->right);
    } else if (key < cur_key) {
      tmp = erase_recursive(t->left, key, add);
      update(t);
    } else {
      tmp = erase_recursive(t->right, key, cur_key);
      update(t);
    }
    return tmp;
  }
};
treap<void, pair<int, int> > t(1024000, false);
int n, m;
node<void, pair<int, int> >*ln1, *ln2, *rn1, *rn2;
pair<int, int> a[1024000];
int ans[1024000];
int res[1024000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
  srand((uint32_t)time(nullptr));
  scanf("%i %i", &n, &m);
  for (size_t i = 1; i <= n; ++i) {
    t.insert(i, make_pair(-1, i));
  }
  for (int i = 0; i < m; ++i) {
    scanf("%i %i", &a[i].first, &a[i].second);
    split(t.root(), (size_t)a[i].second, ln1, rn1);
    split(ln1, (size_t)a[i].second - 1, ln2, rn2);
    if (rn2->value.first == -1 || rn2->value.first == a[i].first) {
      rn2->value.first = a[i].first;
      merge(ln1, rn2, ln2);
      merge(t.root(), ln1, rn1);
    } else {
      printf("-1\n");
      exit(0);
    }
  }
  memset(ans, 0, 1024000 * sizeof(int));
  memset(res, 0, 1024000 * sizeof(int));
  t.output(ans, res, t.root());
  for (int j = 1, i = 1; j <= n, i <= n;) {
    if (!ans[i]) {
      if (!res[j]) {
        ans[i] = j;
        res[j] = i;
        i++;
        j++;
      } else {
        j++;
      }
    } else {
      i++;
    }
  }
  for (int i = 1; i <= n; ++i) {
    printf("%i ", ans[i]);
  }
  return 0;
}
