#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long mod7 = 1000000007LL;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
inline long long add(long long _x, long long _y, long long _mod = mod7) {
  _x += _y;
  return _x >= _mod ? _x - _mod : _x;
}
inline long long sub(long long _x, long long _y, long long _mod = mod7) {
  _x -= _y;
  return _x < 0 ? _x + _mod : _x;
}
inline long long mul(long long _x, long long _y, long long _mod = mod7) {
  _x *= _y;
  return _x >= _mod ? _x % _mod : _x;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1ll;
  long long _ret = mypow(mul(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = mul(_ret, _a, _mod);
  return _ret;
}
long long mymul(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 0ll;
  long long _ret = mymul(add(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = add(_ret, _a, _mod);
  return _ret;
}
void sleep(double sec = 1021) {
  clock_t s = clock();
  while (clock() - s < CLOCKS_PER_SEC * sec)
    ;
}
int __ = 1, _cs;
const int mxN = 2e5;
int n, a[mxN], q, lz[1 << 19];
void app(int i, int x) { lz[i] = max(lz[i], x); }
void psh(int i) {
  app(2 * i, lz[i]);
  app(2 * i + 1, lz[i]);
  lz[i] = 0;
}
void upd(int l1, int x, int i = 1, int l2 = 0, int r2 = n - 1) {
  if (l2 == r2) {
    lz[i] = x;
    return;
  }
  int m2 = (l2 + r2) / 2;
  psh(i);
  if (l1 <= m2)
    upd(l1, x, 2 * i, l2, m2);
  else
    upd(l1, x, 2 * i + 1, m2 + 1, r2);
}
void ans(int i = 1, int l2 = 0, int r2 = n - 1) {
  if (l2 == r2) {
    cout << lz[i] << " ";
    return;
  }
  int m2 = (l2 + r2) / 2;
  psh(i);
  ans(2 * i, l2, m2);
  ans(2 * i + 1, m2 + 1, r2);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    upd(i, a[i]);
  }
  cin >> q;
  while (q--) {
    int qt;
    cin >> qt;
    if (qt == 1) {
      int p, x;
      cin >> p >> x, --p;
      upd(p, x);
    } else {
      int x;
      cin >> x;
      app(1, x);
    }
  }
  ans();
}
