#include <bits/stdc++.h>
using namespace std;
struct qq {
  long long t, ps, x;
};
void solve() {
  long long n, i;
  cin >> n;
  long long a[n];
  long long ans[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    ans[i] = -1;
  }
  long long q;
  cin >> q;
  qq que[q];
  for (i = 0; i < q; i++) {
    long long ty;
    cin >> ty;
    if (ty == 1) {
      long long pos, x;
      cin >> pos >> x;
      pos--;
      que[i].t = 1;
      que[i].ps = pos;
      que[i].x = x;
    } else {
      long long x;
      cin >> x;
      que[i].t = 2;
      que[i].x = x;
    }
  }
  long long vis[n];
  memset(vis, 0, sizeof(vis));
  long long b[n];
  long long maxi = -1;
  for (i = q - 1; i >= 0; i--) {
    if (que[i].t == 2) {
      maxi = max(maxi, que[i].x);
    } else {
      if (!vis[que[i].ps]) {
        ans[que[i].ps] = max(maxi, que[i].x);
        vis[que[i].ps] = 1;
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (!vis[i]) {
      ans[i] = max(maxi, a[i]);
    }
  }
  for (i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
