#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, q, t, p, q1, x, mn = LONG_LONG_MAX, mxx = -1;
  cin >> n;
  long long a[n], ans[n];
  vector<pair<long long, long long> > pr(n, make_pair(-1, -1));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ans[i] = a[i];
    mn = min(mn, a[i]);
  }
  cin >> q;
  q1 = q;
  vector<long long> t2(q + 1, -1);
  long long c = 0;
  while (q1--) {
    c++;
    cin >> t;
    if (t == 1) {
      cin >> p >> x;
      pr[p - 1] = make_pair(x, c);
    } else {
      cin >> x;
      t2[c] = x;
      mxx = max(mxx, x);
    }
  }
  long long arr[q + 2], mx = -1;
  for (int i = 1; i <= 1 + q; i++) arr[i] = -1;
  for (int i = q; i >= 1; i--) arr[i] = max(t2[i], arr[i + 1]);
  for (int i = 0; i < n; i++) {
    if (pr[i].first == -1) {
      if (a[i] < mxx) ans[i] = mxx;
    } else {
      ans[i] = pr[i].first;
      if (arr[pr[i].second] != -1 && ans[i] < arr[pr[i].second])
        ans[i] = arr[pr[i].second];
    }
    cout << ans[i] << " ";
  }
}
