#include <bits/stdc++.h>
using namespace std;
struct Query {
  int type, p, x;
  Query() : type(0), p(0), x(0) {}
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int q;
  cin >> q;
  Query query[q];
  int max_suffix2[q];
  for (int i = 0; i < q; i++) {
    cin >> query[i].type;
    if (query[i].type == 1) {
      cin >> query[i].p >> query[i].x;
    } else {
      cin >> query[i].x;
    }
  }
  for (int i = q - 1, ma = 0; i >= 0; i--) {
    if (query[i].type == 2) {
      ma = max(ma, query[i].x);
    }
    max_suffix2[i] = ma;
  }
  for (int j = 1; j <= n; j++) {
    a[j] = max(a[j], max_suffix2[0]);
  }
  for (int i = 0, pos, val; i < q; i++) {
    if (query[i].type == 1) {
      pos = query[i].p;
      val = query[i].x;
      a[pos] = max(val, max_suffix2[i]);
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << a[i] << ' ';
  }
  cout << '\n';
  return 0;
}
