#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(NULL));
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long q;
  cin >> q;
  vector<vector<long long>> vec;
  for (long long i = 0; i < q; i++) {
    vector<long long> temp;
    long long choice;
    cin >> choice;
    temp.push_back(choice);
    if (choice == 1) {
      long long p, x;
      cin >> p >> x;
      temp.push_back(p);
      temp.push_back(x);
    } else if (choice == 2) {
      long long x;
      cin >> x;
      temp.push_back(x);
    }
    vec.push_back(temp);
  }
  long long m = vec.size();
  long long cur_max = -1;
  bool visited[n];
  for (long long i = 0; i < n; i++) {
    visited[i] = false;
  }
  for (long long i = m - 1; i >= 0; i--) {
    long long choice = vec[i][0];
    if (choice == 1) {
      long long p = vec[i][1];
      long long x = vec[i][2];
      if (visited[p - 1] == false) {
        a[p - 1] = max(x, cur_max);
        visited[p - 1] = true;
      }
    } else if (choice == 2) {
      long long x = vec[i][1];
      if (x > cur_max) {
        cur_max = x;
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    if (visited[i] == false) {
      a[i] = max(a[i], cur_max);
    }
  }
  for (long long i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}
