#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const long long inf64 = 1e18;
const int mod = inf + 7;
const int N = 1e6 + 10;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, q;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i < n + 1; i++) cin >> a[i];
  int c = 0;
  cin >> q;
  vector<int> last(n + 1), pay;
  for (int i = 1; i < q + 1; i++) {
    int type;
    cin >> type;
    if (type == 1) {
      int p, x;
      cin >> p >> x;
      a[p] = x;
      last[p] = c;
    } else {
      int p;
      cin >> p;
      pay.push_back(p);
      c++;
    }
  }
  pay.push_back(0);
  for (int i = c - 1; i >= 0; i--) pay[i] = max(pay[i + 1], pay[i]);
  for (int i = 1; i < n + 1; i++) a[i] = max(a[i], pay[last[i]]);
  for (int i = 1; i < n + 1; i++) cout << a[i] << ' ';
}
