#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
long long MOD = 998244353;
long long mpow(long long a, long long b) {
  if (b >= (MOD - 1)) b %= (MOD - 1);
  if (b == 0) return 1;
  long long t1 = mpow(a, b / 2);
  t1 *= t1;
  t1 %= MOD;
  if (b % 2) t1 *= a;
  t1 %= MOD;
  return t1;
}
long long mpow(long long a, long long b, long long p) {
  if (b == 0) return 1;
  long long t1 = mpow(a, b / 2, p);
  t1 *= t1;
  t1 %= p;
  if (b % 2) t1 *= a;
  t1 %= p;
  return t1;
}
long long modinverse(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long range(long long l, long long r) { return l + rand() % (r - l + 1); }
int main() {
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n];
    for (long long i = 0; i < n; i++) cin >> arr[i];
    long long q;
    cin >> q;
    vector<long long> lupd(n, -1);
    vector<long long> sf(q + 1, -1);
    for (long long i = 0; i < q; i++) {
      long long a;
      cin >> a;
      if (a == 1) {
        long long b, c;
        cin >> b >> c;
        arr[b - 1] = c;
        lupd[b - 1] = i;
      } else {
        long long b;
        cin >> b;
        sf[i] = b;
      }
    }
    long long mt = sf[q - 1];
    for (long long i = q - 1; i >= 0; i--) {
      mt = max(mt, sf[i]);
      sf[i] = mt;
    }
    for (long long i = 0; i < n; i++) {
      arr[i] = max(arr[i], sf[lupd[i] + 1]);
    }
    for (long long i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
  }
}
