#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int a[N], ma[N];
bool vis[N];
struct str {
  int id, va;
} b[N];
int main() {
  int n, q;
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  while (cin >> n) {
    for (int i = 1; i <= n; i++) cin >> a[i];
    memset(vis, 0, sizeof(vis));
    memset(ma, -1, sizeof(ma));
    cin >> q;
    int op, p, x;
    for (int i = 1; i <= q; i++) {
      cin >> op;
      if (op == 1) {
        cin >> p >> x;
        vis[p] = 1;
        b[p].id = i;
        b[p].va = x;
      } else {
        cin >> x;
        ma[i] = x;
      }
    }
    for (int i = q; i > 0; i--) {
      ma[i] = max(ma[i + 1], ma[i]);
    }
    for (int i = 1; i <= n; i++) {
      if (!vis[i]) {
        if (ma[1] > a[i])
          cout << ma[1] << " ";
        else
          cout << a[i] << " ";
      } else {
        int no = b[i].id;
        a[i] = b[i].va;
        if (ma[no] > a[i])
          cout << ma[no] << " ";
        else
          cout << a[i] << " ";
      }
    }
    cout << endl;
  }
  return 0;
}
