#include <bits/stdc++.h>
using namespace std;
void input() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<int>> v;
  int q;
  cin >> q;
  int mi = 0;
  while (q--) {
    int x;
    cin >> x;
    if (x == 1) {
      int i, val;
      cin >> i >> val;
      v.push_back({x, i - 1, val});
    } else {
      int val;
      cin >> val;
      v.push_back({x, val});
    }
  }
  int ma = -1;
  for (int i = v.size() - 1; i >= 0; i--) {
    if (v[i][0] == 2) {
      ma = max(ma, v[i][1]);
    } else if (ma != -1) {
      v[i][2] = max(v[i][2], ma);
    }
  }
  for (int i = 0; i < n; i++) {
    a[i] = max(a[i], ma);
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i][0] == 1) {
      a[v[i][1]] = v[i][2];
    }
  }
  for (int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  input();
  return 0;
}
