#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const int oo = 1 << 30;
const long long loo = 1ll << 62;
const int mods = 1e9 + 7;
const int MAXN = 600005;
const int INF = 0x3f3f3f3f;
inline int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
pair<int, int> c[MAXN], V[MAXN];
int a[MAXN], num = 0, sz = 0, mx[MAXN], id[MAXN];
signed main() {
  int n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  int m = read();
  for (int i = 1; i <= m; i++) {
    int opt = read(), x = read(), y;
    if (opt == 1)
      y = read(), c[++num] = make_pair(i, y), id[num] = x;
    else
      V[++sz] = make_pair(i, x);
  }
  for (int i = sz; i >= 1; i--) upmax(V[i].second, V[i + 1].second);
  for (int i = 1; i <= n; i++) upmax(a[i], V[1].second);
  for (int i = 1; i <= num; i++) {
    int t = lower_bound(V + 1, V + sz + 1, make_pair(c[i].first, 0)) - V;
    a[id[i]] = max(c[i].second, V[t].second);
  }
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
