#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 5;
const long long MOD = 1000000007LL;
const long long INF = (long long)(1e18);
const int inf = 1e9;
int ans;
int n, Q;
int arr[200005];
int tree[MAX_N], lazy[MAX_N];
void build(int node, int left, int right) {
  if (left == right) {
    tree[node] = arr[left];
    return;
  }
  int mid = (left + right) / 2;
  build(2 * node, left, mid);
  build(2 * node + 1, mid + 1, right);
  tree[node] = min(tree[2 * node], tree[2 * node + 1]);
}
void update(int node, int left, int right, int dst, int val) {
  if (right < dst || left > dst) return;
  if (left == right && left == dst) {
    tree[node] = val;
    lazy[node] = -1;
    return;
  }
  lazy[2 * node] = max(lazy[2 * node], lazy[node]);
  lazy[2 * node + 1] = max(lazy[2 * node + 1], lazy[node]);
  lazy[node] = -1;
  int mid = (left + right) / 2;
  update(2 * node, left, mid, dst, val);
  update(2 * node + 1, mid + 1, right, dst, val);
}
void query(int node, int left, int right, int dst) {
  if (right < dst || left > dst) return;
  if (left == right && left == dst) {
    ans = max(tree[node], lazy[node]);
    return;
  }
  lazy[2 * node] = max(lazy[2 * node], lazy[node]);
  lazy[2 * node + 1] = max(lazy[2 * node + 1], lazy[node]);
  int mid = (left + right) / 2;
  query(2 * node, left, mid, dst);
  query(2 * node + 1, mid + 1, right, dst);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 1; i < MAX_N; i++) lazy[i] = -1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  build(1, 1, n);
  cin >> Q;
  while (Q--) {
    int t, p, x;
    cin >> t;
    if (t == 1) {
      cin >> p >> x;
      update(1, 1, n, p, x);
    } else {
      cin >> x;
      lazy[1] = max(x, lazy[1]);
    }
  }
  for (int i = 1; i <= n; i++) {
    ans = -1;
    query(1, 1, n, i);
    cout << ans << " ";
  }
  return 0;
}
