#include <bits/stdc++.h>
using namespace std;
int n, q, y, x, z, mx, c2 = 0;
pair<int, int> a[200001], tt, us[200001];
int tp[200001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = 0;
  }
  cin >> q;
  tp[0] = -1;
  for (int i = 1; i <= q; i++) {
    cin >> y;
    y--;
    tp[i] = y;
    if (y) {
      cin >> x;
      if (tp[i] != tp[i - 1]) {
        c2++;
        us[c2] = make_pair(x, i);
      } else
        us[c2].first = max(us[c2].first, x);
      continue;
    }
    cin >> z >> x;
    a[z] = make_pair(x, i);
  }
  us[c2 + 1].first = INT_MIN;
  for (int i = c2; i >= 1; i--) us[i].first = max(us[i].first, us[i + 1].first);
  for (int i = 1; i <= n; i++) {
    int l = 1, r = c2, mid;
    while (l < r) {
      mid = (l + r) / 2;
      if (us[mid].second >= a[i].second)
        r = mid;
      else
        l = mid + 1;
    }
    if (us[l].second < a[i].second) {
      cout << a[i].first << " ";
      continue;
    }
    if (us[l].first < a[i].first) {
      cout << a[i].first << " ";
      continue;
    }
    cout << us[l].first << " ";
  }
  cout << endl;
  cout.flush();
  return 0;
}
