#include <bits/stdc++.h>
using namespace std;
int const N = 400000;
pair<int, int> x[N];
int an[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) {
    x[i].first = i;
    scanf("%d", &x[i].second);
  }
  int q;
  scanf("%d", &q);
  for (int i = 0; i < (int)(q); ++i) {
    int o;
    scanf("%d", &o);
    if (o == 1) {
      scanf("%d%d", &x[i + n].first, &x[i + n].second);
      --x[i + n].first;
    } else {
      x[i + n].first = -1;
      scanf("%d", &x[i + n].second);
    }
  }
  int mx = 0;
  for (int i = n + q - 1; i >= 0; --i)
    if (x[i].first == -1)
      mx = max(mx, x[i].second);
    else
      x[i].second = max(x[i].second, mx);
  for (int i = 0; i < (int)(n + q); ++i)
    if (x[i].first != -1) an[x[i].first] = x[i].second;
  printf("%d", an[0]);
  for (int i = 1; i < (int)(n); ++i) printf(" %d", an[i]);
  printf("\n");
}
