#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 9;
int n, maxx;
struct p {
  int lei, num, x;
} a[maxn];
int da[maxn], b[maxn], vis[maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> b[i];
  int w;
  cin >> w;
  for (int i = 1; i <= w; i++) {
    cin >> a[i].lei;
    if (a[i].lei == 1) {
      cin >> a[i].num >> a[i].x;
      vis[a[i].num] = i;
      b[a[i].num] = a[i].x;
    } else {
      cin >> a[i].x;
      maxx = max(maxx, a[i].x);
    }
  }
  for (int i = w; i >= 1; i--) {
    if (a[i].lei == 1)
      da[i] = da[i + 1];
    else
      da[i] = max(da[i + 1], a[i].x);
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] == 0)
      cout << max(b[i], maxx) << " ";
    else {
      int xu = vis[i];
      cout << max(b[i], da[xu]) << " ";
    }
  }
}
