#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 10;
int a[maxn];
int suf[maxn];
struct node {
  int op, x, p;
} qu[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int m;
  cin >> m;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &qu[i].op);
    if (qu[i].op == 1) {
      scanf("%d%d", &qu[i].p, &qu[i].x);
    } else
      scanf("%d", &qu[i].x);
  }
  for (int i = m; i >= 1; i--) {
    if (qu[i].op == 1)
      suf[i] = suf[i + 1];
    else
      suf[i] = max(qu[i].x, suf[i + 1]);
  }
  for (int i = 1; i <= n; i++) a[i] = max(a[i], suf[1]);
  for (int i = 1; i <= m; i++) {
    if (qu[i].op == 2) continue;
    a[qu[i].p] = max(qu[i].x, suf[i]);
  }
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
