#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long fx[] = {+1, -1, +0, +0};
const long long fy[] = {+0, +0, +1, -1};
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long q;
  cin >> q;
  vector<pair<long long, long long> > c(n + 1);
  for (long long i = 1; i < n + 1; i++) {
    c[i] = {a[i - 1], 0};
  }
  vector<long long> d(q);
  for (long long i = 0; i < q; i++) {
    long long x;
    cin >> x;
    if (x == 1) {
      long long p, v;
      cin >> p >> v;
      c[p] = {v, i};
    } else {
      long long v;
      cin >> v;
      d[i] = v;
    }
  }
  for (long long i = q - 2; i >= 0; i--) {
    d[i] = max(d[i + 1], d[i]);
  }
  for (long long i = 1; i <= n; i++) {
    cout << max(c[i].first, d[c[i].second]) << " ";
  }
  cout << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
