#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  explicit Solution(vector<int>& a) : a(a) { upd.resize(a.size(), 0); }
  void payoff(int x) { poff.push_back(x); }
  void receipt(int p, int x) {
    a[p - 1] = x;
    upd[p - 1] = poff.size();
  }
  vector<int> getResult() {
    vector<int> mx(poff.size());
    int m = 0;
    for (ssize_t i = poff.size() - 1; i >= 0; --i) {
      m = max(m, poff[i]);
      mx[i] = m;
    }
    vector<int> r(a.size());
    for (size_t i = 0; i < a.size(); ++i) {
      if (upd[i] < poff.size()) {
        r[i] = max(mx[upd[i]], a[i]);
      } else {
        r[i] = a[i];
      }
    }
    return r;
  }
  vector<int>& a;
  vector<int> upd;
  vector<int> poff;
};
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  Solution s(a);
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) {
    int t;
    cin >> t;
    if (t == 1) {
      int p, x;
      cin >> p >> x;
      s.receipt(p, x);
    } else {
      int x;
      cin >> x;
      s.payoff(x);
    }
  }
  vector<int> result = s.getResult();
  bool ne = false;
  for (int x : result) {
    if (ne) {
      cout << ' ';
    } else {
      ne = true;
    }
    cout << x;
  }
  cout << endl;
  return 0;
}
