#include <bits/stdc++.h>
using namespace std;
const int MN = 2e5 + 5;
int n, q;
int a[MN];
struct ST {
  int l, r;
  int m, M;
  int cntm;
  long long sum;
} t[MN * 4];
inline void changeX(int p, int x) {
  t[p].sum -= (long long)(t[p].m - x) * t[p].cntm;
  t[p].m = x;
}
inline void down(int p) {
  int pl = p << 1;
  if (t[pl].m < t[p].m) changeX(pl, t[p].m);
  int pr = pl | 1;
  if (t[pr].m < t[p].m) changeX(pr, t[p].m);
}
inline void upTo(int p) {
  int pl = p << 1;
  int pr = pl | 1;
  t[p].sum = t[pl].sum + t[pr].sum;
  if (t[pl].m == t[pr].m) {
    t[p].m = t[pl].m;
    t[p].cntm = t[pl].cntm + t[pr].cntm;
    t[p].M = max(t[pl].M, t[pr].M);
  } else {
    if (t[pl].m > t[pr].m) swap(pl, pr);
    t[p].m = t[pl].m;
    t[p].cntm = t[pl].cntm;
    t[p].M = max(t[pl].M, t[pr].m);
  }
}
void build(int p, int l, int r) {
  t[p].l = l;
  t[p].r = r;
  if (l == r) {
    t[p].sum = t[p].m = a[l];
    t[p].cntm = 1;
    t[p].M = int(1e9 + 5);
    return;
  }
  int mid = l + r >> 1;
  int pl = p << 1;
  int pr = pl | 1;
  build(pl, l, mid);
  build(pr, mid + 1, r);
  upTo(p);
}
void change1(int p, int l, int x) {
  if (t[p].l == l && t[p].r == l) {
    t[p].sum = t[p].m = x;
    t[p].cntm = 1;
    t[p].M = (1e9 + 5);
    return;
  }
  down(p);
  int mid = t[p].l + t[p].r >> 1;
  if (l <= mid) change1(p << 1, l, x);
  if (mid < l) change1(p << 1 | 1, l, x);
  upTo(p);
}
void change2(int p, int x) {
  if (x <= t[p].m) return;
  if (x < t[p].M) {
    changeX(p, x);
    return;
  }
  down(p);
  int mid = t[p].l + t[p].r >> 1;
  if (1 <= mid) change2(p << 1, x);
  if (mid < n) change2(p << 1 | 1, x);
  upTo(p);
}
long long ask(int p, int l, int r) {
  if (t[p].l >= l && t[p].r <= r) return t[p].sum;
  down(p);
  long long rt = 0;
  int mid = t[p].l + t[p].r >> 1;
  if (mid >= l) rt += ask(p << 1, l, r);
  if (mid < r) rt += ask(p << 1 | 1, l, r);
  return rt;
}
int main(int argc, char *argv[]) {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  build(1, 1, n);
  scanf("%d", &q);
  int op, p, x;
  while (q--) {
    scanf("%d%d", &op, &p);
    if (op == 1)
      scanf("%d", &x), change1(1, p, x);
    else
      change2(1, p);
  }
  for (int i = 1; i <= n; ++i) printf("%lld%c", ask(1, i, i), " \n"[i == n]);
  return 0;
}
