#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 10;
int x[N], mx[N], last[N];
inline void read(int &x) {
  x = 0;
  int f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = 0;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 1) + (x << 3) + (s ^ 48);
    s = getchar();
  }
  x = (!f) ? -x : x;
}
int main() {
  int n, op, a, b, q;
  read(n);
  for (register int i = 1; i <= n; ++i) read(x[i]);
  read(q);
  for (register int i = 1; i <= q; ++i) {
    read(op), read(a);
    if (op == 1) {
      read(b);
      x[a] = b;
      last[a] = i;
    } else
      mx[i] = a;
  }
  for (register int i = q; i >= 0; --i) mx[i] = max(mx[i], mx[i + 1]);
  for (register int i = 1; i <= n; ++i) printf("%d ", max(x[i], mx[last[i]]));
  return 0;
}
