#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, q;
  vector<pair<long long int, pair<long long int, long long int>>> op;
  cin >> n;
  map<long long int, long long int> pres;
  long long int a[n + 5];
  for (long long int i = 1; i < (n + 1); i++) cin >> a[i];
  cin >> q;
  for (long long int i = 0; i < (q); i++) {
    long long int t, p, x;
    cin >> t;
    if (t == 1) {
      cin >> p >> x;
      pres[p]++;
    } else {
      cin >> x;
      p = 0;
    }
    op.push_back(make_pair(t, make_pair(p, x)));
  }
  long long int mask = 0;
  for (long long int i = op.size() - 1; i > (-1); i--) {
    long long int t = op[i].first;
    if (t == 1) {
      (op[i].second).second = max((op[i].second).second, mask);
    } else {
      mask = max(mask, (op[i].second).second);
    }
  }
  for (auto c : op) {
    if (c.first == 1) {
      a[(c.second).first] = (c.second).second;
    }
  }
  for (long long int i = 1; i < (n + 1); i++) {
    if (pres[i] == 0) a[i] = max(a[i], mask);
  }
  for (long long int i = 1; i < (n + 1); i++) cout << a[i] << " ";
}
