#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(n, -1);
  int index, num;
  bool possible = true;
  for (int i = 0; i < m; ++i) {
    cin >> index >> num;
    --index;
    if (n >= 1 and index == 0 and num == 0) {
      possible = false;
      break;
    }
    if (v[index] == -1)
      v[index] = num;
    else if (v[index] != num) {
      possible = false;
      break;
    }
  }
  if (possible) {
    if (v[0] == -1) v[0] = 1;
    for (int i = 1; i < n; ++i) {
      if (v[i] == -1) v[i] = 0;
    }
    copy(v.begin(), v.end(), ostream_iterator<int>(cout, " "));
  } else
    cout << -1;
}
