#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) {
  return pair<S, T>(s.first + t.first, s.second + t.second);
}
template <class S, class T>
pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) {
  return pair<S, T>(s.first - t.first, s.second - t.second);
}
template <class S, class T>
ostream &operator<<(ostream &os, pair<S, T> p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long inf = 1000000001;
const long long INF = 1e18;
const long long MOD = 1000000007;
const double pi = 3.14159265358979323846;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int main() {
  int n, q;
  cin >> n >> q;
  assert(n == 3);
  n *= 2;
  vector<long long> a(n), b(n);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  for (int i = 0; i < (n); i++) {
    cin >> b[i];
  }
  set<pair<int, int> > aa, bb;
  long long ans = 0;
  for (int i = 0; i < (n); i++) {
    if (i == 0) {
      ans += a[i];
      continue;
    }
    if (i == n - 1) {
      ans += a[i];
      continue;
    }
    if (a[i] >= b[i]) {
      ans += a[i];
      aa.insert(pair<int, int>(a[i] - b[i], i));
    } else {
      ans += b[i];
      bb.insert(pair<int, int>(b[i] - a[i], i));
    }
  }
  if ((int)aa.size() % 2) {
    auto itra = aa.begin();
    auto itrb = bb.begin();
    pair<int, int> a_s = *itra, b_s = *itrb;
    if (a_s.first >= b_s.first) {
      bb.erase(b_s);
      int idx = b_s.second;
      ans -= b[idx];
      ans += a[idx];
      aa.insert(pair<int, int>(a[idx] - b[idx], idx));
    } else {
      aa.erase(a_s);
      int idx = a_s.second;
      ans -= a[idx];
      ans += b[idx];
      bb.insert(pair<int, int>(b[idx] - a[idx], idx));
    }
  }
  while (q--) {
    int p, x, y;
    cin >> p >> x >> y;
    p--;
    if (p == 0 || p == n - 1) {
      ans -= a[p];
      a[p] = x;
      b[p] = y;
      ans += a[p];
      cout << ans << endl;
      continue;
    }
    if (aa.count(pair<int, int>(a[p] - b[p], p))) {
      aa.erase(pair<int, int>(a[p] - b[p], p));
      ans -= a[p];
    } else if (bb.count(pair<int, int>(b[p] - a[p], p))) {
      bb.erase(pair<int, int>(b[p] - a[p], p));
      ans -= b[p];
    } else {
      assert(false);
    }
    a[p] = x;
    b[p] = y;
    if (a[p] >= b[p]) {
      ans += a[p];
      aa.insert(pair<int, int>(a[p] - b[p], p));
    } else {
      ans += b[p];
      bb.insert(pair<int, int>(b[p] - a[p], p));
    }
    if ((int)aa.size() % 2) {
      auto itra = aa.begin();
      auto itrb = bb.begin();
      pair<int, int> a_s = *itra, b_s = *itrb;
      if (a_s.first >= b_s.first) {
        bb.erase(b_s);
        int idx = b_s.second;
        ans -= b[idx];
        ans += a[idx];
        aa.insert(pair<int, int>(a[idx] - b[idx], idx));
      } else {
        aa.erase(a_s);
        int idx = a_s.second;
        ans -= a[idx];
        ans += b[idx];
        bb.insert(pair<int, int>(b[idx] - a[idx], idx));
      }
    }
    cout << ans << endl;
  }
}
