#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897923846;
const long long int MOD = 1000000007;
const long long int N = 998244353;
long long int power(long long int x, long long int n) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % MOD;
    x = x * x % MOD;
    n >>= 1;
  }
  return res;
}
long long int modinverse(long long int a) { return power(a, MOD - 2); }
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long int q;
  cin >> q;
  long long int maxm = 0;
  vector<vector<long long int> > offlin(q);
  for (long long int i = 0; i < q; i++) {
    long long int cas;
    cin >> cas;
    if (cas == 1) {
      long long int p, x;
      cin >> p >> x;
      --p;
      offlin[i].push_back(p);
      offlin[i].push_back(x);
    } else {
      long long int x;
      cin >> x;
      offlin[i].push_back(x);
      maxm = max(maxm, x);
    }
  }
  map<long long int, long long int> mp1, mp2;
  long long int shoot = 0;
  for (long long int i = q - 1; i >= 0; i--) {
    if (offlin[i].size() == 2) {
      if (mp1.find(offlin[i][0]) == mp1.end()) {
        mp1[offlin[i][0]]++;
        a[offlin[i][0]] = max(offlin[i][1], shoot);
        mp2[offlin[i][0]] = i;
      }
    } else {
      shoot = max(shoot, offlin[i][0]);
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (mp2.find(i) == mp2.end()) {
      a[i] = max(a[i], maxm);
    }
  }
  for (long long int i = 0; i < n; i++) cout << a[i] << ' ';
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int test = 1;
  while (test--) {
    solve();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
