#include <bits/stdc++.h>
using namespace std;
long long cnum[400005] = {0};
int main() {
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long q, x, y, z, cm = 0;
  cin >> q;
  std::vector<pair<long long, pair<long long, long long> > > p;
  std::vector<long long> q2;
  for (int i = 0; i < q; i++) {
    cin >> x;
    if (x == 1) {
      cin >> y >> z;
      p.push_back({x, {y, z}});
    } else {
      cm++;
      cin >> y;
      p.push_back({x, {y, -1}});
      q2.push_back(y);
    }
  }
  long long maxi = -1, dontexecq2[cm];
  for (int i = cm - 1; i >= 0; i--) {
    if (q2[i] > maxi) {
      dontexecq2[i] = 1;
      maxi = max(maxi, q2[i]);
    } else {
      dontexecq2[i] = 0;
    }
  }
  long long cmcount = 0, flag = 0;
  set<long long> s;
  for (int i = 0; i < q; i++) {
    if (p[i].first == 1) {
      a[p[i].second.first - 1] = p[i].second.second;
      if (flag == 1) {
        s.insert(p[i].second.first - 1);
      }
    } else {
      if (dontexecq2[cmcount] == 0) {
        cmcount++;
        continue;
      }
      z = p[i].second.first;
      if (flag == 0) {
        flag = 1;
        s.clear();
        for (int j = 0; j < n; j++) {
          a[j] = max(a[j], z);
        }
      } else {
        set<long long>::iterator itr = s.begin();
        for (itr = s.begin(); itr != s.end(); itr++) {
          a[*itr] = max(a[*itr], z);
        }
        s.clear();
      }
      cmcount++;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << a[i] << ' ';
  }
}
