#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template <class T = int>
using V = vector<T>;
template <class T = int>
using VV = V<V<T> >;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  V<> a(n);
  for (auto&& e : a) cin >> e;
  V<> last(n, -1);
  int q;
  cin >> q;
  V<> mx(q + 1, -1);
  for (int t = 0; t < q; ++t) {
    int tp;
    cin >> tp;
    if (tp == 1) {
      int i, x;
      cin >> i >> x, --i;
      a[i] = x;
      last[i] = t;
    } else {
      int x;
      cin >> x;
      mx[t] = x;
    }
  }
  for (int t = q - 1; t >= 0; --t) {
    mx[t] = max(mx[t], mx[t + 1]);
  }
  for (int i = 0; i < n; ++i) {
    int res = max(a[i], mx[last[i] + 1]);
    cout << res << " \n"[!(n + ~i)];
  }
}
