#include <bits/stdc++.h>
using namespace std;
struct qtype {
  int flag, p, x;
};
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int q;
  cin >> q;
  qtype b[q];
  for (int i = 0; i < q; i++) {
    int flag, p = -1, x;
    cin >> flag;
    if (flag == 1) {
      cin >> p;
      p--;
    }
    cin >> x;
    b[i] = {flag, p, x};
  }
  int mx2 = -1;
  bool mark[n];
  for (int i = 0; i < n; i++) mark[i] = false;
  for (int i = q - 1; i >= 0; i--) {
    if (b[i].flag == 1) {
      if (mark[b[i].p]) continue;
      a[b[i].p] = b[i].x;
      a[b[i].p] = max(a[b[i].p], mx2);
      mark[b[i].p] = true;
    } else {
      mx2 = max(mx2, b[i].x);
    }
  }
  for (int i = 0; i < n; i++)
    if (!mark[i]) a[i] = max(a[i], mx2);
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  puts("");
}
