#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int n;
  cin >> n;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long int q;
  cin >> q;
  long long int x = -1;
  vector<long long int> v2;
  unordered_map<long long int, pair<long long int, long long int>> m;
  vector<pair<long long int, long long int>> v1;
  for (long long int i = 0; i < q; i++) {
    long long int a;
    cin >> a;
    if (a == 2) {
      long long int x1;
      cin >> x1;
      x = max(x, x1);
      v2.push_back(x1);
    } else {
      long long int p, q1;
      cin >> p >> q1;
      m[p] = {q1, i + 1};
      v2.push_back(-1);
    }
  }
  long long int mx = -1;
  for (long long int i = q - 1; i >= 0; i--) {
    v2[i] = max(mx, v2[i]);
    mx = v2[i];
  }
  for (long long int i = 0; i < n; i++) {
    if (m[i + 1].second == 0) {
      v[i] = max(x, v[i]);
    } else {
      if (m[i + 1].second == q) {
        v[i] = m[i + 1].first;
      } else {
        long long int a = v2[m[i + 1].second];
        if (a == -1)
          v[i] = m[i + 1].first;
        else
          v[i] = max(m[i + 1].first, a);
      }
    }
  }
  for (long long int i = 0; i < n; i++) cout << v[i] << ' ';
  cout << "\n";
  return 0;
}
