#include <bits/stdc++.h>
using namespace std;
int n, mx = 0, a[200007], b[200007], q;
vector<pair<int, pair<int, int>>> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  for (long long i = 1; i <= (long long)n; ++i) cin >> a[i];
  cin >> q;
  for (long long i = 1; i <= (long long)q; ++i) {
    int h, x, y;
    cin >> h;
    if (h == 1) {
      cin >> x >> y;
      v.push_back({1, {x, y}});
    } else {
      cin >> x;
      v.push_back({2, {x, -1}});
    }
  }
  reverse(((v).begin()), ((v).end()));
  int mx = 0;
  for (long long i = 0; i <= (long long)q - 1; ++i) {
    pair<int, pair<int, int>> p = v[i];
    if (p.first == 1) {
      if (b[p.second.first]) continue;
      a[p.second.first] = max(mx, p.second.second);
      b[p.second.first] = 1;
    } else
      mx = max(mx, p.second.first);
  }
  for (long long i = 1; i <= (long long)n; ++i) {
    if (!b[i]) a[i] = max(a[i], mx);
    cout << a[i] << " ";
  }
}
