#include <bits/stdc++.h>
using namespace std;
int rawData[(int)(2e5 + 10)];
pair<int, int> data[(int)(2e5 + 10)];
int c[(int)(2e5 + 10)];
int remx[(int)(2e5 + 10)];
int ind = 0;
int Tree[(int)(2e5 + 10) * 4];
int build(int v, int l, int r) {
  if (l == r) return Tree[v] = remx[l];
  int middle = (l + r) / 2;
  return Tree[v] =
             max(build(v * 2, l, middle), build(v * 2 + 1, middle + 1, r));
}
int getMax(int v, int l, int r, int L, int R) {
  if (L > R) return -(int)2e9;
  if (l == L and r == R) return Tree[v];
  int middle = (l + r) / 2;
  return max(getMax(v * 2, l, middle, L, min(middle, R)),
             getMax(v * 2 + 1, middle + 1, r, max(L, middle + 1), R));
}
int main() {
  for (int i = 0; i < (int)(2e5 + 10); i++) data[i].first = -1;
  int n, q;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    rawData[i] = a;
  }
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> c[i];
    if (c[i] == 1) {
      int a, b;
      cin >> a >> b;
      a--;
      data[a].first = b;
      if (remx[ind])
        data[a].second = ++ind;
      else
        data[a].second = ind;
    } else {
      int a;
      cin >> a;
      remx[ind] = max(remx[ind], a);
    }
  }
  build(1, 0, ind);
  for (int i = 0; i < n; i++) {
    if (data[i].first != -1)
      rawData[i] = max(data[i].first, getMax(1, 0, ind, data[i].second, ind));
    else
      rawData[i] = max(rawData[i], getMax(1, 0, ind, 0, ind));
  }
  for (int i = 0; i < n; i++) cout << rawData[i] << " ";
  return 0;
}
