#include <bits/stdc++.h>
using namespace std;
using pin = std::pair<int, int>;
using veci = vector<int>;
using ull = unsigned long long;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<pin> a(n, make_pair(0, 0));
  for (int i = 0; i < n; ++i) {
    cin >> a[i].first;
  }
  int q;
  int type;
  int p, x;
  cin >> q;
  veci query(q, -1);
  for (int i = 0; i < q; ++i) {
    cin >> type;
    if (type == 1) {
      cin >> p >> x;
      a[p - 1].first = x;
      a[p - 1].second = i;
    } else if (type == 2) {
      cin >> x;
      query[i] = x;
    }
  }
  for (int i = q - 2; i >= 0; --i) {
    query[i] = max(query[i], query[i + 1]);
  }
  for (int i = 0; i < n; ++i) {
    a[i].first = max(a[i].first, query[a[i].second]);
    cout << a[i].first << " ";
  }
  return 0;
}
