#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
const long long inf = 1e18;
int arr[maxn];
int seg[maxn * 4], lazy[maxn * 4];
void push_down(int x, int l, int r) {
  int left = x * 2 + 1, righ = x * 2 + 2;
  if (l != r) {
    lazy[left] = max(lazy[left], lazy[x]);
    lazy[righ] = max(lazy[righ], lazy[x]);
  } else {
    arr[l] = max(arr[l], lazy[x]);
  }
  lazy[x] = 0;
}
void update(int x, int l, int r, int p, int v) {
  if (lazy[x] != 0) push_down(x, l, r);
  if (l == r) {
    arr[l] = v;
    return;
  }
  int mid = (l + r) / 2;
  if (p <= mid) {
    update(x * 2 + 1, l, mid, p, v);
  } else
    update(x * 2 + 2, mid + 1, r, p, v);
}
void update2(int x, int start, int end, int l, int r, int v) {
  if (lazy[x] != 0) push_down(x, l, r);
  if (r < start or end < l) {
    return;
  }
  if (l <= start and end <= r) {
    lazy[x] = max(lazy[x], v);
    push_down(x, l, r);
    return;
  }
  int mid = (start + end) / 2;
  update2(x * 2 + 1, start, mid, l, r, v);
  update2(x * 2 + 2, mid + 1, end, l, r, v);
}
void query(int x, int l, int r, int p) {
  if (lazy[x] != 0) push_down(x, l, r);
  if (l == r) {
    cout << arr[l] << " ";
    return;
  }
  int mid = (l + r) / 2;
  if (p <= mid)
    query(x * 2 + 1, l, mid, p);
  else
    query(x * 2 + 2, mid + 1, r, p);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  int q;
  cin >> q;
  while (q--) {
    int tp, l, r;
    cin >> tp >> l;
    if (tp == 1) {
      cin >> r;
      update(0, 1, n, l, r);
    } else
      update2(0, 1, n, 1, n, l);
  }
  for (int i = 1; i <= n; i++) {
    query(0, 1, n, i);
  }
}
