#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int l[m], r[m], c[m];
  for (int i = 0; i < m; i++) {
    cin >> l[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> r[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> c[i];
  }
  int qqq;
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      if (l[i] > l[j]) {
        qqq = l[i];
        l[i] = l[j];
        l[j] = qqq;
        qqq = r[i];
        r[i] = r[j];
        r[j] = qqq;
        qqq = c[i];
        c[i] = c[j];
        c[j] = qqq;
      }
    }
  }
  for (int i = 0; i < n - 1; i++) {
    if (r[i] + 1 < l[i + 1] || l[0] != 1 || r[m - 1] != n) {
      cout << "-1" << endl;
      return 0;
    } else {
      int s;
      s = c[0];
      cout << s << endl;
    }
  }
}
