#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
struct node {
  int l, r;
  int lz;
} tree[maxn << 2];
void build(int i, int l, int r) {
  tree[i].l = l;
  tree[i].r = r;
  tree[i].lz = 0;
  if (l == r) {
    scanf("%d", &tree[i].lz);
    return;
  }
  int mid = (l + r) >> 1;
  build((i << 1), l, mid);
  build(((i << 1) | 1), mid + 1, r);
}
void push_down(int i) {
  if (tree[i].lz) {
    tree[(i << 1)].lz = max(tree[(i << 1)].lz, tree[i].lz);
    tree[((i << 1) | 1)].lz = max(tree[((i << 1) | 1)].lz, tree[i].lz);
    tree[i].lz = 0;
  }
}
void update(int i, int l, int r, int x, int f) {
  if (tree[i].l == l && tree[i].r == r) {
    if (f) {
      tree[i].lz = x;
    } else {
      tree[i].lz = max(tree[i].lz, x);
    }
    return;
  }
  push_down(i);
  int mid = (tree[i].l + tree[i].r) >> 1;
  if (r <= mid) {
    update((i << 1), l, r, x, f);
  } else if (l > mid) {
    update(((i << 1) | 1), l, r, x, f);
  } else {
    update((i << 1), l, mid, x, f);
    update(((i << 1) | 1), mid + 1, r, x, f);
  }
}
int query(int i, int x) {
  if (tree[i].l == x && tree[i].r == x) {
    return tree[i].lz;
  }
  push_down(i);
  int mid = (tree[i].l + tree[i].r) >> 1;
  if (x <= mid) {
    return query((i << 1), x);
  } else {
    return query(((i << 1) | 1), x);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  build(1, 1, n);
  int m;
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      int x, p;
      scanf("%d%d", &p, &x);
      update(1, p, p, x, 1);
    } else {
      int x;
      scanf("%d", &x);
      update(1, 1, n, x, 0);
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", query(1, i));
  }
  printf("\n");
}
