#include <bits/stdc++.h>
using namespace std;
inline void updMx(int &a, int b) {
  if (a < b) a = b;
}
inline void updMi(int &a, int b) {
  if (a > b) a = b;
}
const int INF = 1e9 + 9;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  cin >> n;
  vector<int> v(n);
  vector<pair<int, int> > gr(n);
  for (int i = (int)(0); i < (int)(n); ++i) {
    cin >> v[i];
    gr[i] = {-1, v[i]};
  }
  vector<pair<int, int> > ind;
  sort(v.begin(), v.end());
  cin >> q;
  for (int i = (int)(0); i < (int)(q); ++i) {
    int type;
    cin >> type;
    if (type == 1) {
      int who, x;
      cin >> who >> x;
      --who;
      gr[who] = {i, x};
    } else {
      int x;
      cin >> x;
      ind.push_back({i, x});
    }
  }
  vector<int> sufs(ind.size());
  if (ind.size()) sufs.back() = ind.back().second;
  for (int i = sufs.size() - 2; i >= 0; --i)
    sufs[i] = max(sufs[i + 1], ind[i].second);
  for (int i = (int)(0); i < (int)(n); ++i) {
    if (ind.empty()) {
      cout << gr[i].second << ' ';
      continue;
    }
    int l = -1, r = sufs.size() - 1;
    while (r - l > 1) {
      int mid = (l + r) >> 1;
      if (ind[mid].first < gr[i].first)
        l = mid;
      else
        r = mid;
    }
    if (ind[r].first < gr[i].first)
      cout << gr[i].second << ' ';
    else
      cout << max(sufs[r], gr[i].second) << ' ';
  }
  return 0;
}
