#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long int power(long long int x, long long int y) {
  if (y == 0) return 1;
  long long int p = power(x, y / 2) % mod;
  p = (p * p) % mod;
  return (y % 2 == 0) ? p : (x * p) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int a[n + 1], b[n + 1];
  for (long long int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long int q;
  cin >> q;
  long long int c[q + 1];
  memset(c, 0, sizeof(c));
  memset(b, 0, sizeof(b));
  for (long long int qq = 1; qq <= q; qq++) {
    long long int type;
    cin >> type;
    if (type == 1) {
      long long int p, x;
      cin >> p >> x;
      a[p] = x;
      b[p] = qq;
    } else if (type == 2) {
      long long int x;
      cin >> x;
      c[qq] = x;
    }
  }
  for (long long int i = q - 1; i >= 1; i--) {
    c[i] = max(c[i], c[i + 1]);
  }
  c[0] = c[1];
  for (long long int i = 1; i <= n; i++) {
    a[i] = max(a[i], c[b[i]]);
  }
  for (long long int i = 1; i <= n; i++) cout << a[i] << " ";
}
