#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> b(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> b[i + 1];
  }
  int q;
  cin >> q;
  vector<int> last(n + 1, -1);
  vector<long long> q1(n + 1, -1);
  vector<int> q11(n + 1, -1);
  vector<long long> q2(q + 1, -1);
  for (int i = 1; i <= q; i++) {
    int y;
    cin >> y;
    if (y == 1) {
      int p;
      long long x;
      cin >> p >> x;
      q1[p] = x;
      q11[p] = i;
    } else {
      long long x;
      cin >> x;
      q2[i] = x;
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    q2[i] = max(q2[i], q2[i + 1]);
  }
  for (int i = 1; i <= n; i++) {
    if (q1[i] == -1) {
      cout << max(q2[0], b[i]);
    } else {
      cout << max(q2[q11[i]], q1[i]);
    }
    if (i != n) {
      cout << " ";
    }
  }
  cout << endl;
}
