#include <bits/stdc++.h>
using namespace std;
inline void err(istringstream *iss) {}
template <typename T, typename... Args>
void err(istringstream *iss, const T &$val, const Args &...args) {
  string $name;
  *iss >> $name;
  if ($name.back() == ',') $name.pop_back();
  cout << $name << " = " << $val << "; ", err(iss, args...);
}
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll llinf = (1ll << 61) - 1;
long n, m, K, T, Q, cn;
pair<long, long> q[200005];
long a[200005], ans[200005];
signed main() {
  cin.tie(NULL);
  cin >> n;
  for (long i = 1; i <= n; i++) {
    scanf("%ld", &a[i]);
  }
  cin >> Q;
  for (long i = 0; i < Q; i++) {
    long t;
    scanf("%ld", &t);
    if (t == 2)
      scanf("%ld", &q[i].second), q[i].first = -1;
    else
      scanf("%ld%ld", &q[i].first, &q[i].second);
  }
  long mx = -1;
  memset(ans, -1, sizeof(ans));
  for (long i = Q - 1; i >= 0; i--) {
    if (q[i].first == -1)
      mx = max(mx, q[i].second);
    else if (ans[q[i].first] == -1)
      ans[q[i].first] = max(mx, q[i].second);
  }
  for (long i = 1; i <= n; i++) {
    printf("%ld", ans[i] == -1 ? max(a[i], mx) : ans[i]),
        printf("%c", " \n"[i == n]);
  }
  return 0;
}
