#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> A(n);
  for (auto &a : A) cin >> a;
  int q;
  cin >> q;
  vector<vector<int>> Q;
  for (int i = 0; i < q; ++i) {
    int t;
    cin >> t;
    if (t == 1) {
      int p, x;
      cin >> p >> x;
      --p;
      Q.push_back({t, p, x});
    } else {
      int x;
      cin >> x;
      Q.push_back({t, x});
    }
  }
  vector<bool> updated(n, false);
  int X = -1;
  while (--q >= 0) {
    vector<int> t = Q[q];
    if (t[0] == 1) {
      int p = t[1];
      if (updated[p]) continue;
      updated[p] = true;
      A[p] = max(t[2], X);
    } else {
      X = max(X, t[1]);
    }
  }
  for (int i = 0; i < n; ++i) {
    if (updated[i]) continue;
    A[i] = max(A[i], X);
  }
  for (auto a : A) cout << a << " ";
  cout << endl;
}
