#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n, m, a[maxn], ans[maxn];
struct SegmentTree {
  struct Node {
    int val, add;
  } mem[maxn << 2];
  SegmentTree() {}
  void build(int *a, int curpos, int curl, int curr) {
    if (curl == curr) {
      mem[curpos].val = a[curl];
      mem[curpos].add = 0;
      return;
    }
    int mid = curl + curr >> 1;
    build(a, (curpos << 1), curl, mid);
    build(a, (curpos << 1 | 1), mid + 1, curr);
  }
  void update(int curpos, int pos, int curl, int curr, int val) {
    if (curl == curr) {
      mem[curpos].val = val;
      mem[curpos].add = 0;
      return;
    }
    int mid = curl + curr >> 1;
    mem[(curpos << 1)].add = max(mem[curpos].add, mem[(curpos << 1)].add);
    mem[(curpos << 1 | 1)].add =
        max(mem[curpos].add, mem[(curpos << 1 | 1)].add);
    mem[curpos].add = 0;
    if (pos <= mid)
      update((curpos << 1), pos, curl, mid, val);
    else
      update((curpos << 1 | 1), pos, mid + 1, curr, val);
  }
  void maintain(int curpos, int curl, int curr) {
    if (curl == curr) {
      ans[curl] = max(mem[curpos].val, mem[curpos].add);
      return;
    }
    mem[(curpos << 1)].add = max(mem[(curpos << 1)].add, mem[curpos].add);
    mem[(curpos << 1 | 1)].add =
        max(mem[(curpos << 1 | 1)].add, mem[curpos].add);
    int mid = curl + curr >> 1;
    maintain((curpos << 1), curl, mid);
    maintain((curpos << 1 | 1), mid + 1, curr);
  }
} st;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  st.build(a, 1, 1, n);
  scanf("%d", &m);
  while (m--) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      int pos, val;
      scanf("%d%d", &pos, &val);
      st.update(1, pos, 1, n, val);
    } else {
      int val;
      scanf("%d", &val);
      st.mem[1].add = max(st.mem[1].add, val);
    }
  }
  st.maintain(1, 1, n);
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
