#include <bits/stdc++.h>
using namespace std;
struct node {
  long long int ch, p, x;
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, q;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cin >> q;
  vector<node> query(q);
  long long int ch, p, x, index;
  long long int track = -1;
  for (long long int i = 0; i < q; i++) {
    cin >> ch;
    if (ch == 1) {
      cin >> p >> x;
      node n1;
      n1.ch = 1;
      n1.p = p;
      n1.x = x;
      query[i] = n1;
    } else {
      cin >> x;
      if (x > track) {
        track = x;
        index = i;
      }
      node n1;
      n1.ch = 2;
      n1.p = -1;
      n1.x = x;
      query[i] = n1;
    }
  }
  if (track != -1) {
    vector<long long int> vis(n, 0);
    long long int maxm = 0;
    for (long long int i = q - 1; i >= 0; i--) {
      if (query[i].ch == 1 && vis[query[i].p - 1] == 0) {
        a[query[i].p - 1] = max(query[i].x, maxm);
        vis[query[i].p - 1] = 1;
      } else if (query[i].ch == 2) {
        maxm = max(maxm, query[i].x);
      }
    }
    for (long long int i = 0; i < n; i++) {
      if (vis[i] == 0) a[i] = max(a[i], track);
    }
  } else {
    vector<long long int> vis(n, 0);
    for (long long int i = q - 1; i >= 0; i--) {
      if (query[i].ch == 1 && vis[query[i].p - 1] == 0) {
        a[query[i].p - 1] = query[i].x;
        vis[query[i].p - 1] = 1;
      }
    }
  }
  for (long long int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}
