#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
bool vis[N];
int A[N];
struct node {
  int op, a, b;
} Q[N];
int main() {
  int n, q;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &A[i]);
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    scanf("%d", &Q[i].op);
    if (Q[i].op == 1) {
      scanf("%d %d", &Q[i].a, &Q[i].b);
    } else {
      scanf("%d", &Q[i].a);
    }
  }
  int maxx = 0;
  for (int i = q - 1; i >= 0; i--) {
    if (Q[i].op == 2) {
      maxx = max(maxx, Q[i].a);
    } else {
      Q[i].b = max(maxx, Q[i].b);
      if (!vis[Q[i].a]) {
        vis[Q[i].a] = 1;
        A[Q[i].a] = Q[i].b;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i])
      printf("%d ", A[i]);
    else {
      printf("%d ", max(maxx, A[i]));
    }
  }
}
