#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int q;
  cin >> q;
  vector<vector<int> > v(q);
  int x1, x2, x3;
  for (int i = 0; i < q; i++) {
    cin >> x1;
    v[i].push_back(x1);
    if (x1 == 1) {
      cin >> x2 >> x3;
      v[i].push_back(x2);
      v[i].push_back(x3);
    } else if (x1 == 2) {
      cin >> x2;
      v[i].push_back(x2);
    }
  }
  map<int, int> m;
  int x = INT_MIN, y = INT_MIN;
  for (int j = q - 1; j >= 0; j--) {
    if (v[j][0] == 1) {
      x = max(v[j][2], x);
      m[v[j][1] - 1]++;
      if (m[v[j][1] - 1] == 1) a[v[j][1] - 1] = max(x, y);
      x = INT_MIN;
    } else if (v[j][0] == 2)
      y = max(y, v[j][1]);
  }
  for (int i = 0; i < n; i++) {
    if (m[i] == 0) a[i] = max(a[i], y);
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
}
