#include <bits/stdc++.h>
using namespace std;
struct node {
  int ta;
  int fl;
  int x;
} bian[200005];
int maxl, turn;
int main() {
  int n;
  cin >> n;
  long long a[200005];
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int q;
  cin >> q;
  maxl = 0;
  int ans = 0;
  for (int i = 1; i <= q; ++i) {
    int zho, ta, x;
    cin >> zho;
    if (zho == 1) {
      ++ans;
      cin >> ta >> x;
      bian[ans].fl = zho;
      bian[ans].x = x;
      bian[ans].ta = ta;
    } else {
      ++ans;
      cin >> x;
      bian[ans].fl = zho;
      bian[ans].x = x;
    }
  }
  int biao = 0;
  for (int i = ans; i > 0; --i) {
    if (bian[i].fl == 2) {
      biao = max(biao, bian[i].x);
    } else {
      if (bian[i].x < biao) bian[i].x = biao;
    }
  }
  if (biao > 0)
    for (int i = 1; i <= n; ++i)
      if (a[i] < biao) a[i] = biao;
  for (int i = 1; i <= ans; ++i) {
    if (bian[i].fl == 1) {
      a[bian[i].ta] = bian[i].x;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (i != 1) cout << " ";
    cout << a[i];
  }
}
