#include <bits/stdc++.h>
using namespace std;
int const N = 200001;
int n, q, in[N], an[N], mx[N], pos[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", in + i);
  }
  memset(pos, -1, sizeof pos);
  scanf("%d", &q);
  for (int i = 0; i < q; ++i) {
    int t, p, x;
    scanf("%d", &t);
    if (t == 2) {
      scanf("%d", &x);
      mx[i] = x;
    } else {
      scanf("%d%d", &p, &x);
      --p;
      pos[p] = i;
      in[p] = x;
    }
  }
  for (int i = q - 1; i >= 0; --i) {
    mx[i] = max(mx[i], mx[i + 1]);
  }
  for (int i = 0; i < n; ++i) {
    int lst = pos[i];
    if (lst == -1)
      an[i] = max(in[i], mx[0]);
    else {
      an[i] = max(in[i], mx[lst + 1]);
    }
  }
  for (int i = 0; i < n; ++i) printf("%d ", an[i]);
}
