#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
vector<long long> a;
long long st[800002];
long long lazy[800002];
void build(long long node, long long start, long long end) {
  if (start == end) {
    st[node] = a[start];
    return;
  }
  long long mid = (start + end) >> 1;
  build(node << 1, start, mid);
  build(node << 1 | 1, mid + 1, end);
  st[node] = min(st[node << 1], st[node << 1 | 1]);
}
void resolveLazy(long long node, long long start, long long end) {
  if (lazy[node]) {
    st[node] = max(st[node], lazy[node]);
    if (start != end) {
      lazy[node << 1] = max(lazy[node << 1], lazy[node]);
      lazy[node << 1 | 1] = max(lazy[node << 1 | 1], lazy[node]);
    }
    lazy[node] = 0;
  }
}
long long query(long long node, long long start, long long end, long long q) {
  resolveLazy(node, start, end);
  if (start == end) return st[node];
  long long mid = (start + end) >> 1;
  if (q <= mid)
    return query(node << 1, start, mid, q);
  else
    return query(node << 1 | 1, mid + 1, end, q);
}
void update(long long node, long long start, long long end, long long q,
            long long x) {
  resolveLazy(node, start, end);
  if (start == end) {
    st[node] = x;
    return;
  }
  long long mid = (start + end) >> 1;
  if (q <= mid)
    update(node << 1, start, mid, q, x);
  else
    update(node << 1 | 1, mid + 1, end, q, x);
  st[node] = min(st[node << 1], st[node << 1 | 1]);
}
signed main() {
  long long n;
  scanf("%lld", &n);
  a.resize(n);
  for (auto& i : a) scanf("%lld", &i);
  build(1, 0, n - 1);
  long long q;
  scanf("%lld", &q);
  while (q--) {
    long long t;
    scanf("%lld", &t);
    if (t == 1) {
      long long p, x;
      scanf("%lld%lld", &p, &x);
      p -= 1;
      update(1, 0, n - 1, p, x);
    } else if (t == 2) {
      long long x;
      scanf("%lld", &x);
      lazy[1] = max(lazy[1], x);
    }
  }
  {
    for (long long i = 0; i < n; i++) printf("%lld ", query(1, 0, n - 1, i));
    puts("");
  };
}
