func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Event {     int type;     int p;     int x;   };   int main() {     ios_base::sync_with_stdio(0);     int n;     cin >> n;     vector<int> v(n);     for (auto& el : v) {       cin >> el;     }     int q;     cin >> q;     vector<Event> evs(q);     for (auto& ev : evs) {       cin >> ev.type;       if (ev.type == 2) {         cin >> ev.x;       } else {         cin >> ev.p >> ev.x;         ev.p--;       }     }     int mx = 0;     vector<bool> has_ans(n, false);     for (int i = q - 1; i >= 0; i--) {       if (evs[i].type == 1) {         if (!has_ans[evs[i].p]) {           v[evs[i].p] = max(mx, evs[i].x);           has_ans[evs[i].p] = true;         }       } else {         mx = max(evs[i].x, mx);       }     }     for (int i = 0; i < n; i++) {       if (!has_ans[i]) {         v[i] = max(v[i], mx);       }     }     for (auto& el : v) {       cout << el <<    ;     }     cout << endl;     return 0;   }   