#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, p, q, r, s, rr = 0;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  cin >> q;
  vector<long long> upd(n), mx(q);
  for (long long i = 0; i < q; i++) {
    cin >> p;
    if (p == 1) {
      cin >> r >> s;
      a[r - 1] = s;
      upd[r - 1] = i;
    } else {
      cin >> r;
      mx[i] = r;
    }
  }
  for (long long i = q - 2; i >= 0; i--) {
    mx[i] = max(mx[i], mx[i + 1]);
  }
  for (long long i = 0; i < n; i++) {
    cout << max(a[i], mx[upd[i]]) << " ";
  }
  return 0;
}
