#include <bits/stdc++.h>
using namespace std;
const int maxn = 111;
const long long inf = 1ll << 55;
int n, q;
int x[maxn], y[maxn];
bool vis[maxn][maxn][maxn];
long long dp[maxn][maxn][maxn];
long long solve(int c, int a, int b) {
  if (c == n) {
    if (a == 0 && b == 0) return 0;
    return -inf;
  }
  if (a < 0) return -inf;
  if (b < 0) return -inf;
  if (vis[c][a][b]) return dp[c][a][b];
  long long ans = -inf;
  ans = max(ans, x[c] + solve(c + 1, a + 1, b + 1));
  ans = max(ans, x[c] + solve(c + 1, a - 1, b - 1));
  ans = max(ans, y[c] + solve(c + 1, a + 1, b - 1));
  ans = max(ans, y[c] + solve(c + 1, a - 1, b + 1));
  vis[c][a][b] = 1;
  return dp[c][a][b] = ans;
}
int main() {
  scanf("%d %d", &n, &q);
  n *= 2;
  if (n > 50) return 0;
  for (int e = 0; e < n; e++) scanf("%d", x + e);
  for (int e = 0; e < n; e++) scanf("%d", y + e);
  while (q--) {
    int t, a, b;
    scanf("%d %d %d", &t, &a, &b);
    t--;
    x[t] = a;
    y[t] = b;
    memset(vis, false, sizeof(vis));
    cout << solve(0, 0, 0) << endl;
  }
  return 0;
}
