#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-O3")
using ld = long double;
const long long int mod = 1000000007;
const long long int inf = 1000000000000000000;
const long long int rk = 256;
const ld PI = 3.141592653589793;
ostream& operator<<(ostream& os, pair<long long int, long long int> const& x) {
  os << x.first << "," << x.second;
  return os;
}
template <class T>
ostream& operator<<(ostream& os, vector<T> const& x) {
  os << "{ ";
  for (auto& y : x) os << y << " ";
  return os << "}";
}
template <class T>
ostream& operator<<(ostream& os, set<T> const& x) {
  os << "{ ";
  for (auto& y : x) os << y << " ";
  return os << "}";
}
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr>& operator<<(basic_ostream<Ch, Tr>& os,
                                  Container const& x) {
  os << "{ ";
  for (auto& y : x) os << y << " ";
  return os << "}";
}
template <class X, class Y>
ostream& operator<<(ostream& os, pair<X, Y> const& p) {
  return os << "[ " << p.first << ", " << p.second << "]";
}
const int tot = 1e6 + 5;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<long long int> a(2 * tot, 0);
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long int q;
  vector<long long int> pos(2 * tot, 0);
  vector<long long int> ans(2 * tot, 0);
  cin >> q;
  for (int time = 1; time <= q; time++) {
    long long int operation, p, x;
    cin >> operation;
    if (operation == 1) {
      cin >> p >> x;
      a[p] = x;
      pos[p] = time;
    } else {
      cin >> ans[time];
    }
  }
  for (int i = q; i >= 1; i--) {
    ans[i] = max(ans[i], ans[i + 1]);
  }
  for (int i = 1; i <= n; i++) cout << max(a[i], ans[pos[i] + 1]) << " ";
  return 0;
}
