#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
using namespace std;
const int INF = 1000 * 1000 * 1000 + 7;
const long long LINF = 1LL * INF * INF;
const int MAX = 1e5 + 7;
const double PI = acos(-1.);
const double EPS = 1e-7;
const int MOD = 998244353;
int t[800005], is[800005];
void push(int v, int vl, int vr) {
  if (is[v]) {
    t[v] = max(t[v], is[v]);
    if (vl != vr) {
      is[v + v] = max(is[v], is[v + v]);
      is[v + v + 1] = max(is[v], is[v + v + 1]);
    }
    is[v] = 0;
  }
}
void update(int v, int vl, int vr, int pos, int val) {
  push(v, vl, vr);
  if (vl == vr) {
    t[v] = val;
    return;
  }
  int mid = (vl + vr) >> 1;
  if (pos <= mid) {
    update(v + v, vl, mid, pos, val);
  } else {
    update(v + v + 1, mid + 1, vr, pos, val);
  }
  t[v] = min(t[v + v], t[v + v + 1]);
}
void update(int v, int vl, int vr, int l, int r, int val) {
  if (vl > r || l > vr) {
    return;
  }
  push(v, vl, vr);
  if (vl >= l && vr <= r) {
    is[v] = max(is[v], val);
    push(v, vl, vr);
    return;
  }
  int mid = (vl + vr) >> 1;
  update(v + v, vl, mid, l, r, val);
  update(v + v + 1, mid + 1, vr, l, r, val);
  t[v] = min(t[v + v], t[v + v + 1]);
}
int getEl(int v, int vl, int vr, int pos) {
  push(v, vl, vr);
  if (vl == vr) {
    return t[v];
  }
  int mid = (vl + vr) >> 1;
  if (pos <= mid) {
    return getEl(v + v, vl, mid, pos);
  } else {
    return getEl(v + v + 1, mid + 1, vr, pos);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n);
  fill(t, t + 800005, INF);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    update(1, 0, n - 1, i, a[i]);
  }
  int q;
  cin >> q;
  while (q--) {
    int type;
    cin >> type;
    if (type == 1) {
      int p, x;
      cin >> p >> x;
      --p;
      update(1, 0, n - 1, p, x);
    } else {
      int x;
      cin >> x;
      update(1, 0, n - 1, 0, n - 1, x);
    }
  }
  for (int i = 0; i < (n); ++i) {
    cout << getEl(1, 0, n - 1, i) << ' ';
  }
  return 0;
}
