#include <bits/stdc++.h>
using namespace std;
void Main();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  while (~cin.peek()) Main(), cin.get();
  return 0;
}
void Main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<int> count(n + 1);
  int m;
  cin >> m;
  vector<int> maxv;
  for (int i = 1; i <= m; i++) {
    int t, p, x;
    cin >> t;
    if (t == 1) {
      cin >> p >> x;
      a[p] = x;
      count[p] = maxv.size();
    } else {
      cin >> x;
      maxv.push_back(x);
    }
  }
  maxv.push_back(0);
  for (int i = maxv.size() - 2; i >= 0; i--) {
    maxv[i] = max(maxv[i], maxv[i + 1]);
  }
  for (int i = 1; i <= n; i++) {
    cout << max(a[i], maxv[count[i]]) << " \n"[i == n];
  }
}
