#include <bits/stdc++.h>
const long long M = 998244353;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long x = -1, fin = -1;
  map<long long, long long> mp;
  vector<long long> v;
  set<long long> s;
  long long q;
  cin >> q;
  while (q--) {
    long long m;
    cin >> m;
    long long p, y;
    if (m == 1) {
      cin >> p >> y;
      mp[p - 1] = v.size();
      s.insert(p - 1);
      a[p - 1] = y;
    } else {
      cin >> y;
      v.push_back(y);
    }
  }
  if (v.size() == 0) {
    for (int i = 0; i < n; i++) cout << a[i] << " ";
    return 0;
  }
  vector<long long> max1(v.size());
  max1[v.size() - 1] = v.back();
  for (int i = v.size() - 2; i >= 0; i--) {
    if (v[i] > max1[i + 1])
      max1[i] = v[i];
    else
      max1[i] = max1[i + 1];
  }
  map<long long, long long>::iterator it;
  for (it = mp.begin(); it != mp.end(); it++) {
    if (it->second == 0) {
      a[it->first] = max(a[it->first], max1[0]);
    } else {
      if (it->second >= v.size())
        continue;
      else {
        a[it->first] = max(a[it->first], max1[it->second]);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (mp.find(i) == mp.end()) {
      a[i] = max(a[i], max1[0]);
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
