func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     vector<int> a(n);     for (int i = 0; i < n; i++) {       cin >> a[i];     }     int q;     cin >> q;     vector<int> ta(n, -1);     vector<int> payouts(q, 0);     for (int i = 0; i < q; i++) {       int k, p, x;       cin >> k;       if (k == 1) {         cin >> p >> x;         a[p - 1] = x;         ta[p - 1] = i;       } else {         cin >> x;         payouts[i] = x;       }     }     vector<int> maxpayouts(q, payouts[q - 1]);     for (int i = q - 2; i >= 0; i--) {       maxpayouts[i] = max(maxpayouts[i + 1], payouts[i]);     }     maxpayouts.push_back(0);     for (int i = 0; i < n; i++) {       int res = max(maxpayouts[ta[i] + 1], a[i]);       cout << res <<    ;     }     cout <<   n ;   }   