#include <bits/stdc++.h>
using namespace std;
const int N = 11;
const long long INF = 1e18;
int n, q;
long long a[N], b[N];
void Solve() {
  while (q--) {
    int p;
    long long x, y;
    cin >> p >> x >> y;
    a[p] = x, b[p] = y;
    long long ans = -INF;
    for (int mask = 0; mask < 1 << (n - 2); ++mask)
      if (!(__builtin_popcount(mask) & 1)) {
        long long sum = 0;
        for (int i = 0; i < n - 2; ++i)
          if ((mask >> i) & 1)
            sum += b[i + 2];
          else
            sum += a[i + 2];
        ans = max(ans, sum);
      }
    cout << ans + a[1] + a[n] << '\n';
  }
}
int main() {
  cin >> n >> q;
  assert(n <= 5);
  n *= 2;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) cin >> b[i];
  Solve();
  return 0;
}
