#include <bits/stdc++.h>
using namespace std;
const long long inf = 2000000000000000000LL;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t, n, m, i, j, k, temp, flag, ans, q;
  cin >> n;
  vector<pair<long long, long long> > v;
  for (i = 0; i < n; i++) {
    cin >> temp;
    v.push_back({temp, 0});
  }
  cin >> q;
  i = 0;
  map<long long, long long> mp;
  for (k = 0; k < q; k++) {
    i++;
    cin >> temp;
    if (temp == 1) {
      cin >> temp >> m;
      v[temp - 1] = make_pair(m, i);
    } else {
      cin >> temp;
      mp[i] = temp;
    }
  }
  vector<long long> bal[q + 5];
  for (i = 0; i < n; i++) {
    bal[v[i].second].push_back(i);
  }
  flag = 0;
  for (i = q + 4; i >= 0; i--) {
    flag = max(flag, mp[i]);
    for (j = 0; j < bal[i].size(); j++) {
      temp = bal[i][j];
      v[temp].first = max(v[temp].first, flag);
    }
  }
  for (i = 0; i < n; i++) cout << v[i].first << " ";
  return 0;
}
