#include <bits/stdc++.h>
using namespace std;
using lld = long long int;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> t(n);
  for (int& i : t) cin >> i;
  int q;
  cin >> q;
  vector<pair<int, int> > p(q, {-1, -1});
  for (int i = 0; i < q; i++) {
    int x;
    cin >> x >> p[i].first;
    if (x == 1) {
      p[i].first--;
      cin >> p[i].second;
    }
  }
  int mn = 0;
  vector<int> res(n, -1);
  for (int i = q - 1; i >= 0; i--) {
    if (p[i].second != -1 && res[p[i].first] == -1)
      res[p[i].first] = max(p[i].second, mn);
    else if (p[i].second == -1)
      mn = max(mn, p[i].first);
  }
  for (int i = 0; i < n; i++)
    if (res[i] == -1) res[i] = max(mn, t[i]);
  for (int i : res) cout << i << " ";
  cout << "\n";
  return 0;
}
