#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    ;
  for (; c >= '0' && c <= '9'; c = getchar()) x = (x << 3) + (x << 1) + c - '0';
  return x;
}
inline void _write(int x) {
  if (x > 9) _write(x / 10);
  putchar(x % 10 + '0');
}
inline void write(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  _write(x);
  putchar('\n');
}
const int MAXN = 200005;
int n, q;
int a[MAXN], lc[MAXN];
int st1[MAXN], st2[MAXN], stop;
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  q = read();
  for (int qi = 1; qi <= q; qi++) {
    int op = read(), p, x;
    if (op == 1) {
      p = read(), x = read();
      a[p] = x;
      lc[p] = qi;
    } else {
      x = read();
      while (stop && st1[stop] <= x) --stop;
      st1[++stop] = x;
      st2[stop] = qi;
    }
  }
  st1[++stop] = 0;
  st2[stop] = q + 1;
  for (int i = 1; i <= n; ++i)
    a[i] = max(a[i], st1[lower_bound(st2 + 1, st2 + 1 + stop, lc[i]) - st2]);
  for (int i = 1; i <= n; ++i) printf("%d%c", a[i], " \n"[i == n]);
}
