#include <bits/stdc++.h>
const int inf = 2e9;
const int maxn = 2e5 + 10;
long long sum[maxn << 2];
int mv[maxn << 2][2], smv[maxn << 2][2], mvn[maxn << 2][2], a[maxn],
    col[maxn << 2], mcol[maxn << 2][2];
inline int MV(int x, int y, int ck) {
  if ((ck && x > y) || (!ck && x < y))
    return x;
  else
    return y;
}
inline void updata(int rt) {
  sum[rt] = sum[rt << 1] + sum[rt << 1 | 1];
  for (int ck = 0; ck < 2; ck++)
    if (mv[rt << 1][ck] == mv[rt << 1 | 1][ck]) {
      mv[rt][ck] = mv[rt << 1][ck];
      mvn[rt][ck] = mvn[rt << 1][ck] + mvn[rt << 1 | 1][ck];
      smv[rt][ck] = MV(smv[rt << 1][ck], smv[rt << 1 | 1][ck], ck);
    } else {
      int tp = ((ck ? mv[rt << 1][ck] > mv[rt << 1 | 1][ck]
                    : mv[rt << 1][ck] < mv[rt << 1 | 1][ck]) ^
                1);
      mv[rt][ck] = mv[(rt << 1) ^ tp][ck];
      mvn[rt][ck] = mvn[(rt << 1) ^ tp][ck];
      smv[rt][ck] = MV(smv[(rt << 1) ^ tp][ck], mv[(rt << 1 | 1) ^ tp][ck], ck);
    }
}
inline void color(int l, int r, int rt, int v) {
  sum[rt] += (long long)(r - l + 1) * v;
  mv[rt][0] += v;
  mv[rt][1] += v;
  col[rt] += v;
  if (smv[rt][0] != inf) smv[rt][0] += v;
  if (smv[rt][1] != -inf) smv[rt][1] += v;
}
inline void mcolor(int rt, int ck, int v) {
  if (mv[rt][ck] == mv[rt][ck ^ 1]) {
    mv[rt][ck ^ 1] += v;
    mcol[rt][ck ^ 1] += v;
  }
  if (mv[rt][ck] == smv[rt][ck ^ 1]) smv[rt][ck ^ 1] += v;
  mv[rt][ck] += v;
  sum[rt] += (long long)mvn[rt][ck] * v;
  mcol[rt][ck] += v;
}
inline void pushcol(int l, int r, int rt) {
  if (col[rt]) {
    int mid = (l + r) >> 1;
    color(l, mid, rt << 1, col[rt]);
    color(mid + 1, r, rt << 1 | 1, col[rt]);
    col[rt] = 0;
  }
  for (int i = 0; i < 2; i++)
    if (mcol[rt][i]) {
      if (mv[rt][i] == mv[rt << 1][i] + mcol[rt][i])
        mcolor(rt << 1, i, mcol[rt][i]);
      if (mv[rt][i] == mv[rt << 1 | 1][i] + mcol[rt][i])
        mcolor(rt << 1 | 1, i, mcol[rt][i]);
    }
  mcol[rt][0] = mcol[rt][1] = 0;
}
inline void add(int l, int r, int rt, int nl, int nr, int v) {
  if (nl <= l && nr >= r) {
    color(l, r, rt, v);
    return;
  }
  pushcol(l, r, rt);
  int mid = (l + r) >> 1;
  if (nl <= mid) add(l, mid, rt << 1, nl, nr, v);
  if (nr > mid) add(mid + 1, r, rt << 1 | 1, nl, nr, v);
  updata(rt);
}
inline void same(int l, int r, int rt, int v, int ck) {
  if (!(ck ? mv[rt][ck] > v : mv[rt][ck] < v))
    return;
  else if ((ck ? v > smv[rt][ck] : v < smv[rt][ck])) {
    mcolor(rt, ck, v - mv[rt][ck]);
    return;
  }
  pushcol(l, r, rt);
  int mid = (l + r) >> 1;
  same(l, mid, rt << 1, v, ck);
  same(mid + 1, r, rt << 1 | 1, v, ck);
  updata(rt);
}
inline void modify(int l, int r, int rt, int nl, int nr, int v, int ck) {
  if (nl <= l && nr >= r) {
    same(l, r, rt, v, ck);
    return;
  }
  pushcol(l, r, rt);
  int mid = (l + r) >> 1;
  if (nl <= mid) modify(l, mid, rt << 1, nl, nr, v, ck);
  if (nr > mid) modify(mid + 1, r, rt << 1 | 1, nl, nr, v, ck);
  updata(rt);
}
inline void build(int l, int r, int rt) {
  col[rt] = mcol[rt][0] = mcol[rt][1] = 0;
  if (l == r) {
    mv[rt][0] = mv[rt][1] = a[l];
    mvn[rt][0] = mvn[rt][1] = 1;
    smv[rt][0] = inf;
    smv[rt][1] = -inf;
    sum[rt] = (long long)a[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  updata(rt);
}
void update_point(int l, int r, int rt, int pos, int v) {
  if (l == r) {
    mv[rt][0] = mv[rt][1] = v;
    mvn[rt][0] = mvn[rt][1] = 1;
    smv[rt][0] = inf;
    smv[rt][1] = -inf;
    sum[rt] = (long long)a[l];
    return;
  }
  pushcol(l, r, rt);
  int mid = (l + r) >> 1;
  if (mid >= pos)
    update_point(l, mid, 2 * rt, pos, v);
  else
    update_point(mid + 1, r, 2 * rt + 1, pos, v);
  updata(rt);
}
int query_p(int l, int r, int rt, int p) {
  if (l == r) return mv[rt][0];
  pushcol(l, r, rt);
  int mid = (l + r) >> 1, res;
  if (mid >= p)
    res = query_p(l, mid, 2 * rt, p);
  else
    res = query_p(mid + 1, r, 2 * rt + 1, p);
  updata(rt);
  return res;
}
inline int read() {
  char c = getchar();
  int tv = 0, ck = 1;
  while (c < '0' || c > '9') {
    if (c == '-') ck = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    tv = (tv << 1) + (tv << 3) + c - '0';
    c = getchar();
  }
  return tv * ck;
}
int main() {
  int n, m;
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  build(1, n, 1);
  m = read();
  for (int i = 1; i <= m; i++) {
    int op = read();
    if (op == 1) {
      int p = read(), x = read();
      update_point(1, n, 1, p, x);
    } else {
      int v = read();
      modify(1, n, 1, 1, n, v, 0);
    }
  }
  for (int i = 1; i <= n; ++i)
    printf("%d%c", query_p(1, n, 1, i), " \n"[i == n]);
  return 0;
}
