#include <bits/stdc++.h>
using namespace std;
const long long pp = 1e9 + 7;
const long double eps = 1e-8;
inline long long ksm(long long x, long long y = pp - 2) {
  x = (x % pp + pp) % pp;
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x % pp;
    x = x * x % pp;
    y >>= 1;
  }
  return ans;
}
inline long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
inline long long readll() {
  long long x = 0, sign = 1;
  char ch;
  while (ch < '0' || ch > '9') ch = getchar(), sign = (ch == '-') ? -1 : sign;
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return x * sign;
}
inline int read() {
  int x = 0, sign = 1;
  char ch;
  while (ch < '0' || ch > '9') ch = getchar(), sign = (ch == '-') ? -1 : sign;
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return x * sign;
}
inline void reads(char s[], int &n) {
  n = 0;
  char ch = getchar();
  while (ch == ' ' || ch == '\n' || ch == '\r') ch = getchar();
  while (ch != ' ' && ch != '\n' && ch != '\r') s[++n] = ch, ch = getchar();
}
inline void write(long long x) {
  if (!x)
    putchar(48);
  else {
    static char w[29];
    static int t = 0;
    if (x < 0) x = -x, putchar('-');
    while (x) w[++t] = 48 ^ (x % 10), x /= 10;
    while (t) putchar(w[t--]);
  }
}
int n, q, opt, p, xv;
int a[200009];
struct TNODE {
  int l, r, v, x;
} S[800009];
void build(int cur = 1, int l = 1, int r = n) {
  S[cur].l = l, S[cur].r = r;
  S[cur].x = S[cur].v = 0;
  if (l == r) {
    S[cur].v = a[l];
    return;
  }
  build((cur << 1), l, ((l + r) >> 1));
  build(((cur << 1) | 1), ((l + r) >> 1) + 1, r);
}
void pushdown(int t) {
  if (S[t].x) {
    S[(t << 1)].x = (S[(t << 1)].x > S[t].x ? S[(t << 1)].x : S[t].x);
    S[((t << 1) | 1)].x =
        (S[((t << 1) | 1)].x > S[t].x ? S[((t << 1) | 1)].x : S[t].x);
    S[(t << 1)].v =
        (S[(t << 1)].v > S[(t << 1)].x ? S[(t << 1)].v : S[(t << 1)].x);
    S[((t << 1) | 1)].v =
        (S[((t << 1) | 1)].v > S[((t << 1) | 1)].x ? S[((t << 1) | 1)].v
                                                   : S[((t << 1) | 1)].x);
    S[t].x = 0;
  }
}
void modify(int p, int v, int cur = 1) {
  if (p < S[cur].l || p > S[cur].r) return;
  if (S[cur].l == S[cur].r) {
    S[cur].v = v;
    S[cur].x = 0;
    return;
  }
  pushdown(cur);
  modify(p, v, (cur << 1));
  modify(p, v, ((cur << 1) | 1));
}
void ask(int cur = 1) {
  if (S[cur].l == S[cur].r) {
    printf("%d", S[cur].v);
    if (S[cur].l < n) putchar(' ');
    return;
  }
  pushdown(cur);
  ask((cur << 1));
  ask(((cur << 1) | 1));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  scanf("%d", &q);
  build();
  while (q--) {
    scanf("%d", &opt);
    if (opt == 1) {
      scanf("%d%d", &p, &xv);
      modify(p, xv);
    } else {
      scanf("%d", &xv);
      S[1].x = (S[1].x > xv ? S[1].x : xv);
      S[1].v = (S[1].v > xv ? S[1].v : xv);
    }
  }
  ask();
  putchar('\n');
  return 0;
}
