#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 3 * 1e5;
long long n, q, a[MAXN], vis[MAXN], maxx[MAXN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cin >> q;
  long long num, pos, x, cnt = 0;
  for (int i = 1; i <= q; i++) {
    cin >> num;
    if (num == 1)
      cin >> pos >> x, vis[pos] = cnt, a[pos] = x;
    else
      cin >> x, maxx[++cnt] = x;
  }
  maxx[cnt + 1] = -0x3f3f3f3f;
  for (int i = cnt; i >= 1; i--) maxx[i] = max(maxx[i + 1], maxx[i]);
  for (int i = 1; i <= n; i++) cout << max(a[i], maxx[vis[i] + 1]) << ' ';
  return 0;
}
