func_code_string: #include <bits/stdc++.h>   using namespace std;   using ll = long long;   using ii = pair<int, int>;   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     int n;     cin >> n;     vector<int> v(n);     for (auto &i : v) cin >> i;     int q;     cin >> q;     vector<int> idx(n, 0);     vector<int> ops(q, 0);     for (int i = 0; i < q; ++i) {       int op;       cin >> op;       if (op == 1) {         int p, x;         cin >> p >> x;         v[p - 1] = x;         idx[p - 1] = i;       } else {         int x;         cin >> x;         ops[i] = x;       }     }     for (int i = q - 2; i >= 0; --i) ops[i] = max(ops[i], ops[i + 1]);     for (int i = 0; i < n; ++i) {       v[i] = max(ops[idx[i]], v[i]);     }     for (int i = 0; i < n; ++i) cout << v[i] <<    ;     cout <<   n ;     return 0;   }   