#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long T = 1, i, j;
  while (T--) {
    long long n;
    cin >> n;
    vector<long long> v(n);
    for (i = 0; i < n; i++) {
      cin >> v[i];
    }
    long long q;
    cin >> q;
    vector<vector<long long>> queries(q, vector<long long>(3));
    for (i = 0; i < q; i++) {
      long long a, b, c;
      cin >> a;
      if (a == 1) {
        cin >> b >> c;
        queries[i][0] = a;
        queries[i][1] = b;
        queries[i][2] = c;
      } else {
        cin >> b;
        queries[i][0] = 2;
        queries[i][1] = b;
        queries[i][2] = -999999999999999999;
      }
    }
    long long maxpayoff = -999999999999999999;
    vector<bool> visited(n);
    for (i = q - 1; i >= 0; i--) {
      if (queries[i][0] == 1) {
        long long ind = queries[i][1] - 1;
        if (!visited[ind]) {
          v[ind] = max(queries[i][2], maxpayoff);
          visited[ind] = true;
        }
      } else {
        maxpayoff = max(maxpayoff, queries[i][1]);
      }
    }
    for (i = 0; i < n; i++) {
      if (!visited[i]) v[i] = max(v[i], maxpayoff);
      cout << v[i] << " ";
    }
  }
  return 0;
}
