#include <bits/stdc++.h>
using namespace std;
const int Maxn = 200000;
struct node {
  int v;
} tree[4 * Maxn + 5];
int a[Maxn];
void pushdown(int k) {
  if (tree[k].v) {
    tree[2 * k].v = max(tree[k].v, tree[2 * k].v);
    tree[2 * k + 1].v = max(tree[k].v, tree[2 * k + 1].v);
    tree[k].v = 0;
  }
}
void build(int l, int r, int k) {
  if (l == r) {
    tree[k].v = a[l];
    return;
  }
  int mid = (l + r) / 2;
  build(l, mid, 2 * k);
  build(mid + 1, r, 2 * k + 1);
}
void update(int x, int n, int l, int r, int k) {
  if (l == r) {
    tree[k].v = x;
    return;
  }
  int mid = (l + r) / 2;
  pushdown(k);
  if (n <= mid)
    update(x, n, l, mid, 2 * k);
  else
    update(x, n, mid + 1, r, 2 * k + 1);
}
int query(int x, int l, int r, int p) {
  if (x > r || x < l) return 0;
  if (l == r) return tree[p].v;
  int mid = (l + r) / 2;
  pushdown(p);
  int ans = max(query(x, l, mid, 2 * p), query(x, mid + 1, r, 2 * p + 1));
  return ans;
}
int main() {
  int n, q;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  build(1, n, 1);
  cin >> q;
  for (int i = 1; i <= q; i++) {
    int op, x, y;
    cin >> op;
    if (op == 1) {
      cin >> x >> y;
      update(y, x, 1, n, 1);
    } else if (op == 2) {
      cin >> x;
      tree[1].v = max(x, tree[1].v);
    }
  }
  for (int i = 1; i <= n; i++) cout << query(i, 1, n, 1) << " ";
  return 0;
}
