#include <bits/stdc++.h>
using namespace std;
struct node {
  int num, x, y;
} s[200005];
int n, q, a[200005], pos[200005], maxn, flag[200005], flag1[200005];
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", &s[i].num);
    if (s[i].num == 1) {
      scanf("%d%d", &s[i].x, &s[i].y);
      flag1[s[i].x] = 1;
    }
    if (s[i].num == 2) scanf("%d", &s[i].x);
  }
  for (int i = q; i >= 1; i--) {
    if (s[i].num == 1) {
      if (!flag[s[i].x]) {
        flag[s[i].x] = 1;
        a[s[i].x] = max(s[i].y, maxn);
      }
    } else
      maxn = max(maxn, s[i].x);
  }
  for (int i = 1; i <= n; i++) {
    if (!flag1[i]) a[i] = max(a[i], maxn);
  }
  for (int i = 1; i < n; i++) printf("%d ", a[i]);
  printf("%d\n", a[n]);
}
