#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 5;
int a[maxn];
bool vis[maxn];
struct Node {
  int tp;
  int p, x;
} ins[maxn];
int n, q;
int max_x;
int main() {
  memset(vis, false, sizeof(vis));
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    scanf("%d", &ins[i].tp);
    if (ins[i].tp == 1)
      scanf("%d%d", &ins[i].p, &ins[i].x);
    else if (ins[i].tp == 2)
      scanf("%d", &ins[i].x);
  }
  for (int i = q - 1; i >= 0; i--) {
    if (ins[i].tp == 1) {
      if (vis[ins[i].p]) continue;
      vis[ins[i].p] = true;
      a[ins[i].p] = max(ins[i].x, max_x);
    } else if (ins[i].tp == 2)
      max_x = max(max_x, ins[i].x);
  }
  for (int i = 1; i <= n; i++) {
    if (i > 1) printf(" ");
    if (vis[i])
      printf("%d", a[i]);
    else if (!vis[i])
      printf("%d", max(a[i], max_x));
  }
  printf("\n");
  return 0;
}
