#include <bits/stdc++.h>
using namespace std;
vector<long long> fac(400009);
void fc() {
  fac[1] = 1;
  for (long long i = 2; i < 400009; i++) fac[i] = (i * fac[i - 1]) % 998244353;
}
long long pwr(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % 998244353;
    a = (a * a) % 998244353;
    b = b / 2;
  }
  return res;
}
long long modinverse(long long a) { return pwr(a, 998244353 - 2); }
long long ncr(long long n, long long r) {
  if (r == 0 || n == r) return 1;
  return (((fac[n] * modinverse(fac[r])) % 998244353) * modinverse(fac[n - r]) %
          998244353);
}
void solve() {
  long long n, q, id, x, a;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  cin >> q;
  long long j = 0;
  vector<long long> eq(q, 0);
  map<long long, pair<long long, long long> > mp;
  long long pq = q;
  while (q--) {
    cin >> a;
    if (a == 1) {
      cin >> id >> x;
      id--;
      mp[id] = {x, j};
    } else {
      cin >> x;
      eq[j] = x;
    }
    j++;
  }
  q = pq;
  for (long long i = q - 2; i >= 0; i--) {
    eq[i] = max(eq[i], eq[i + 1]);
  }
  long long lastidx, sufmax;
  for (long long i = 0; i < n; i++) {
    if (mp.find(i) != mp.end()) {
      lastidx = mp[i].second;
      sufmax = eq[lastidx];
      v[i] = max(mp[i].first, sufmax);
    } else {
      v[i] = max(eq[0], v[i]);
    }
    cout << v[i] << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
