#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int n, m, t, p, x;
long long lazy[maxn << 2], minn[maxn << 2], maxx[maxn << 2], ans[maxn];
void pushup(int rt) {
  minn[rt] = min(minn[rt << 1], minn[rt << 1 | 1]);
  maxx[rt] = max(maxx[rt << 1], maxx[rt << 1 | 1]);
}
void build(int l, int r, int rt) {
  if (l == r) {
    scanf("%lld", &minn[rt]);
    maxx[rt] = minn[rt];
    return;
  }
  int m = l + r >> 1;
  build(l, m, rt << 1);
  build(m + 1, r, rt << 1 | 1);
  pushup(rt);
}
void pushdown(int rt) {
  if (lazy[rt]) {
    lazy[rt << 1] = lazy[rt << 1 | 1] = lazy[rt];
    maxx[rt << 1] = minn[rt << 1] = lazy[rt];
    maxx[rt << 1 | 1] = minn[rt << 1 | 1] = lazy[rt];
    lazy[rt] = 0;
  }
}
void update(int L, int R, int v, int l, int r, int rt, bool flag) {
  if (flag) {
    if (minn[rt] >= v) return;
    if (L <= l && r <= R) {
      if (maxx[rt] <= v) {
        maxx[rt] = minn[rt] = v;
        lazy[rt] = v;
        return;
      }
    }
  } else {
    if (L <= l && r <= R) {
      maxx[rt] = minn[rt] = v;
      lazy[rt] = v;
      return;
    }
  }
  pushdown(rt);
  int m = l + r >> 1;
  if (L <= m) update(L, R, v, l, m, rt << 1, flag);
  if (R > m) update(L, R, v, m + 1, r, rt << 1 | 1, flag);
  pushup(rt);
}
void query(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) {
    if (minn[rt] == maxx[rt]) {
      for (int i = l; i <= r; i++) ans[i] = minn[rt];
      return;
    }
  }
  pushdown(rt);
  int m = l + r >> 1;
  if (L <= m) query(L, R, l, m, rt << 1);
  if (R > m) query(L, R, m + 1, r, rt << 1 | 1);
}
int main() {
  scanf("%d", &n);
  build(1, n, 1);
  scanf("%d", &m);
  while (m--) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d%d", &p, &x);
      update(p, p, x, 1, n, 1, false);
    } else {
      scanf("%d", &x);
      update(1, n, x, 1, n, 1, true);
    }
  }
  query(1, n, 1, n, 1);
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  return 0;
}
