#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 50;
long long sum[maxn << 2], lazy[maxn << 2];
void push_up(int rt) { sum[rt] = max(sum[rt << 1], sum[rt << 1 | 1]); }
void push_down(int rt) {
  if (lazy[rt]) {
    lazy[rt << 1] = max(lazy[rt], lazy[rt << 1]);
    lazy[rt << 1 | 1] = max(lazy[rt], lazy[rt << 1 | 1]);
    sum[rt << 1] = max(lazy[rt], sum[rt << 1]);
    sum[rt << 1 | 1] = max(lazy[rt], sum[rt << 1 | 1]);
    lazy[rt] = 0;
  }
}
void update(int a, int b, long long v, int l, int r, int rt) {
  if (a <= l && b >= r) {
    sum[rt] = max(sum[rt], v);
    lazy[rt] = max(lazy[rt], v);
    return;
  }
  push_down(rt);
  int mid = (l + r) >> 1;
  if (a <= mid) update(a, b, v, l, mid, rt << 1);
  if (b > mid) update(a, b, v, mid + 1, r, rt << 1 | 1);
  push_up(rt);
}
void insert(int p, long long k, int l, int r, int rt) {
  if (l == r) {
    sum[rt] = k;
    return;
  }
  int mid = (l + r) >> 1;
  push_down(rt);
  if (p <= mid)
    insert(p, k, l, mid, rt << 1);
  else
    insert(p, k, mid + 1, r, rt << 1 | 1);
  push_up(rt);
}
long long query(int a, int b, int l, int r, int rt) {
  if (a <= l && b >= r) {
    return sum[rt];
  }
  int mid = (l + r) >> 1;
  push_down(rt);
  long long ans = 0;
  if (a <= mid) ans = max(ans, query(a, b, l, mid, rt << 1));
  if (b > mid) ans = max(ans, query(a, b, mid + 1, r, rt << 1 | 1));
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    insert(i, x, 1, n, 1);
  }
  int q;
  cin >> q;
  while (q--) {
    int op;
    cin >> op;
    if (op == 1) {
      int pos, val;
      cin >> pos >> val;
      insert(pos, val, 1, n, 1);
    } else {
      int val;
      cin >> val;
      update(1, n, val, 1, n, 1);
    }
  }
  for (int i = 1; i <= n; i++) cout << query(i, i, 1, n, 1) << " ";
  cout << endl;
  return 0;
}
