#include <bits/stdc++.h>
using namespace std;
int a[200005];
int vis[200005];
int hmax[200005];
int main() {
  int i, j, n, m, x, y;
  cin >> n;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  cin >> m;
  int maxn = 0;
  for (i = 1; i <= m; i++) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d%d", &x, &y);
      vis[x] = i;
      a[x] = y;
    } else {
      scanf("%d", &x);
      hmax[i] = x;
    }
  }
  for (i = m; i >= 0; i--) {
    hmax[i] = max(hmax[i], hmax[i + 1]);
  }
  for (i = 1; i <= n; i++) {
    a[i] = max(a[i], hmax[vis[i]]);
  }
  for (i = 1; i < n; i++) printf("%d ", a[i]);
  cout << a[n] << endl;
  return 0;
}
