#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n], vis[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int q;
  cin >> q;
  int query[q][3];
  for (int i = 0; i < q; i++) {
    cin >> query[i][0] >> query[i][1];
    if (query[i][0] == 1) cin >> query[i][2];
  }
  int mx = -1;
  for (int i = 0; i < n; i++) vis[i] = -1;
  for (int i = q - 1; i >= 0; i--) {
    if (query[i][0] == 1 && vis[query[i][1] - 1] == -1) {
      a[query[i][1] - 1] = max(mx, query[i][2]);
      vis[query[i][1] - 1] = 1;
    } else if (query[i][0] == 2)
      mx = max(mx, query[i][1]);
  }
  for (int i = 0; i < n; i++) {
    if (vis[i] == -1) a[i] = max(a[i], mx);
    cout << a[i] << " ";
  }
}
