#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, Q;
int a[maxn], opt, id, val;
struct Query {
  int id, val;
} q[maxn];
int qr[maxn];
int maxx, maxid;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  scanf("%d", &Q);
  for (int i = 1; i <= Q; i++) {
    scanf("%d", &opt);
    if (opt == 1) {
      scanf("%d %d", &id, &val);
      q[id] = {i, val};
    }
    if (opt == 2) {
      scanf("%d", &val);
      qr[i] = val;
    }
  }
  for (int i = Q; i >= 1; i--) qr[i] = max(qr[i], qr[i + 1]);
  for (int i = 1; i <= n; i++) {
    if (q[i].id == 0)
      a[i] = max(a[i], qr[1]);
    else
      a[i] = max(q[i].val, qr[q[i].id]);
  }
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
