#include <bits/stdc++.h>
using namespace std;
int ans[202020], lt[202020], mx[202020], k, p, x, n, q;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ans[i];
  }
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> k;
    if (k == 1) {
      cin >> p >> x;
      ans[p] = x;
      lt[p] = i;
    } else {
      cin >> x;
      mx[i] = x;
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    mx[i] = max(mx[i], mx[i + 1]);
  }
  for (int i = 1; i <= n; i++) {
    cout << max(ans[i], mx[lt[i]]) << " ";
  }
}
