#include <bits/stdc++.h>
using namespace std;
int n, n_q;
int arr[200005];
int t[200005];
int main() {
  vector<pair<int, pair<int, int>>> operations;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    operations.push_back(make_pair(1, make_pair(arr[i], i)));
  }
  cin >> n_q;
  int type, p, x;
  for (int i = 0; i < n_q; i++) {
    cin >> type;
    if (type == 1) {
      cin >> p >> x;
      operations.push_back(make_pair(1, make_pair(x, p - 1)));
    } else {
      cin >> x;
      operations.push_back(make_pair(2, make_pair(x, -1)));
    }
  }
  int currentMax = -1;
  for (int i = operations.size() - 1; i >= 0; i--) {
    if (operations[i].first == 2 && operations[i].second.first > currentMax) {
      currentMax = operations[i].second.first;
    }
    if (operations[i].first == 1 && i >= t[operations[i].second.second]) {
      if (operations[i].second.first < currentMax) {
        arr[operations[i].second.second] = currentMax;
      } else {
        arr[operations[i].second.second] = operations[i].second.first;
      }
      t[operations[i].second.second] = i;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
  return 0;
}
