#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, q;
  cin >> n;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; i++) cin >> a[i].second;
  cin >> q;
  vector<pair<int, int> > z;
  for (int qi = 0; qi < q; qi++) {
    int c, p, x;
    cin >> c;
    if (c == 1) {
      cin >> p >> x;
      a[p - 1] = make_pair(qi + 1, x);
    } else if (c == 2) {
      cin >> x;
      z.push_back(make_pair(qi + 1, x));
    }
  }
  vector<int> m(q + 1);
  for (int i = 0; i < z.size(); i++) m[z[i].first] = z[i].second;
  for (int i = m.size() - 2; i >= 0; i--) m[i] = max(m[i], m[i + 1]);
  for (int i = 0; i < n; i++) {
    int x = max(a[i].second, m[a[i].first]);
    cout << (i ? " " : "") << x;
  }
  cout << "\n";
  return 0;
}
