#include <bits/stdc++.h>
using namespace std;
int N, M;
const int MAXN = 222222;
int64_t A[MAXN];
int O[MAXN];
int P[MAXN];
int64_t X[MAXN];
int64_t X2M[MAXN];
int main() {
  cin >> N;
  int i;
  for (i = 0; i < N; i++) scanf("%ld", &A[i]);
  cin >> M;
  int m;
  int o, p;
  int64_t x;
  for (m = 0; m < M; m++) {
    scanf("%d", &O[m]);
    if (O[m] == 1) {
      scanf("%d%ld", &P[m], &X[m]);
      P[m]--;
    } else {
      scanf("%ld", &X[m]);
    }
    X2M[m] = 0;
  }
  X2M[M] = 0;
  for (m = M - 1; m >= 0; m--)
    X2M[m] = O[m] == 2 ? max(X2M[m + 1], X[m]) : X2M[m + 1];
  for (m = 0; m < M; m++)
    if (O[m] == 2 && X[m] < X2M[m]) O[m] = 0;
  set<int> ndex;
  bool first = true;
  for (m = 0; m < M; m++) {
    if (O[m] == 1) {
      A[P[m]] = X[m];
      if (!first) ndex.insert(P[m]);
    } else if (O[m] == 2) {
      if (first) {
        for (i = 0; i < N; i++) A[i] = max(A[i], X[m]);
      } else {
        for (int nd : ndex) A[nd] = max(A[nd], X[m]);
        ndex.clear();
      }
      first = false;
    }
  }
  for (i = 0; i < N; i++) printf("%ld ", A[i]);
  return 0;
}
