#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
bool cus1(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first + a.second < b.first + b.second;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  {
    long long n;
    cin >> n;
    vector<long long> arr(n + 1);
    vector<pair<int, int>> ans(n + 1);
    for (int i = 1; i <= n; i++) {
      cin >> arr[i];
      ans[i].first = arr[i];
    }
    int q;
    cin >> q;
    vector<int> inc(q + 2), pnc(q + 2);
    for (int i = 1; i <= q; i++) {
      int x;
      cin >> x;
      if (x == 2) {
        int y;
        cin >> y;
        pnc[i] = y;
      } else {
        int y, z;
        cin >> y >> z;
        ans[y].first = z;
        ans[y].second = i;
      }
    }
    for (int i = q; i >= 0; i--) {
      inc[i] = max(inc[i + 1], pnc[i]);
    }
    for (int i = 1; i <= n; i++) {
      cout << max(ans[i].first, inc[ans[i].second]) << " ";
    }
    cout << endl;
  }
}
