#include <bits/stdc++.h>
using namespace std;
int a[200010], t[200010], st[200010], sx[200010], eqlt[200010], eqlx[200010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    t[i] = -1;
  }
  int q;
  cin >> q;
  int cnt = 0;
  eqlt[0] = -1, eqlx[0] = 0;
  for (int i = 0; i < q; i++) {
    int eid;
    cin >> eid;
    if (eid == 1) {
      int p, x;
      cin >> p >> x;
      t[p - 1] = i;
      a[p - 1] = x;
    } else {
      int x;
      cin >> x;
      st[cnt] = i;
      sx[cnt] = x;
      cnt++;
    }
  }
  int cntt = 0;
  eqlt[0] = st[cnt - 1], eqlx[0] = sx[cnt - 1];
  for (int j = cnt - 2; j >= 0; j--)
    if (sx[j] > eqlx[cntt]) {
      cntt++;
      eqlx[cntt] = sx[j];
      eqlt[cntt] = st[j];
    }
  for (int i = 0; i < n; i++) {
    for (int j = cntt; j >= 0; j--) {
      if (eqlt[j] > t[i]) {
        if (eqlx[j] > a[i]) a[i] = eqlx[j];
        break;
      }
    }
  }
  cout << a[0];
  for (int i = 1; i < n; i++) cout << " " << a[i];
  cout << endl;
  return 0;
}
