#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LNF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1000000007;
const double EPS = 1e-8;
const long double EUL = 2.71828182845904523536;
const long double PII = 3.14159265358979323846;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  while (cin >> n) {
    int arr[n];
    for (auto &x : arr) cin >> x;
    int q;
    cin >> q;
    int change[n];
    int total[q];
    memset(change, -1, sizeof change);
    memset(total, -1, sizeof total);
    int mx = -1;
    for (int i = 0; i < q; i++) {
      int x;
      cin >> x;
      if (x == 1) {
        int p, c;
        cin >> p >> c;
        p--;
        arr[p] = c;
        change[p] = i;
      } else {
        int val;
        cin >> val;
        total[i] = val;
        mx = max(mx, val);
      }
    }
    for (int i = q - 2; i >= 0; i--) total[i] = max(total[i], total[i + 1]);
    for (int i = 0; i < n; i++) {
      if (change[i] == -1)
        arr[i] = max(mx, arr[i]);
      else
        arr[i] = max(arr[i], total[change[i]]);
      cout << arr[i] << " ";
    }
    cout << endl;
  }
  cerr << "Time : " << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
