#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, q, p, x, t;
  cin >> n;
  int a[n + 1];
  for (i = 1; i <= n; i++) cin >> a[i];
  cin >> q;
  int maxs[q + 1];
  int lastup[n + 1];
  for (i = 0; i <= q; i++) maxs[i] = 0;
  for (i = 1; i <= n; i++) lastup[i] = 1;
  for (i = 1; i <= q; i++) {
    cin >> t;
    if (t == 1) {
      cin >> p >> x;
      a[p] = x;
      lastup[p] = i;
    } else if (t == 2) {
      cin >> x;
      maxs[i] = x;
    }
  }
  for (i = q - 1; i > 0; i--) maxs[i] = max(maxs[i], maxs[i + 1]);
  for (i = 1; i <= n; i++) a[i] = max(a[i], maxs[lastup[i]]);
  for (i = 1; i <= n; i++) cout << a[i] << " ";
}
