#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 10;
int a[MAX], N;
class Node {
 public:
  int l, r;
  int val, lazy;
  Node() { l = r = val = lazy = 0; }
  int mid() { return (l + r) / 2; }
} tree[MAX << 2];
void push_up(int r) {
  tree[r].val = min(tree[(r << 1)].val, tree[(r << 1 | 1)].val);
}
void push_down(int r) {
  if (tree[r].lazy) {
    tree[(r << 1)].lazy = max(tree[r].lazy, tree[(r << 1)].lazy);
    tree[(r << 1 | 1)].lazy = max(tree[r].lazy, tree[(r << 1 | 1)].lazy);
    tree[(r << 1)].val = max(tree[(r << 1)].val, tree[r].lazy);
    tree[(r << 1 | 1)].val = max(tree[(r << 1 | 1)].val, tree[r].lazy);
    tree[r].lazy = 0;
  }
}
void build_tree(int r, int L, int R) {
  tree[r].l = L;
  tree[r].r = R;
  tree[r].lazy = 0;
  if (L == R) {
    tree[r].val = a[L];
    return;
  }
  int mid = tree[r].mid();
  build_tree((r << 1), L, mid);
  build_tree((r << 1 | 1), mid + 1, R);
  push_up(r);
}
void update_point(int r, int p, int v) {
  if (tree[r].l == tree[r].r && p == tree[r].l) {
    tree[r].val = v;
    return;
  }
  push_down(r);
  int mid = tree[r].mid();
  if (p <= mid)
    update_point((r << 1), p, v);
  else
    update_point((r << 1 | 1), p, v);
  push_up(r);
}
void update_interval(int r, int val) {
  if (tree[r].val >= val) return;
  tree[r].val = val;
  tree[r].lazy = max(tree[r].lazy, val);
}
int query(int r, int p) {
  if (tree[r].l == tree[r].r && tree[r].l == p) return tree[r].val;
  push_down(r);
  int mid = tree[r].mid();
  if (p <= mid)
    return query((r << 1), p);
  else
    return query((r << 1 | 1), p);
}
int main(void) {
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) scanf("%d", &a[i]);
  build_tree(1, 1, N);
  int Q;
  scanf("%d", &Q);
  int op, p, x;
  for (int i = 1; i <= Q; ++i) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d%d", &p, &x);
      update_point(1, p, x);
    } else {
      scanf("%d", &x);
      update_interval(1, x);
    }
  }
  for (int i = 1; i <= N; ++i) {
    printf("%d", query(1, i));
    printf("%c", (i == N ? '\n' : ' '));
  }
  return 0;
}
