#include <bits/stdc++.h>
using namespace std;
const long long MD = 1e9 + 7;
long long INF = 1e17;
const int N = 1e6 + 22;
long long n, m, t, k;
long long arr[N];
long long x, y;
string s;
int P = 262144;
long long tree[N], lazy[N];
void push(int u) {
  lazy[u * 2] = max(lazy[u], lazy[u * 2]);
  lazy[u * 2 + 1] = max(lazy[u], lazy[u * 2 + 1]);
  lazy[u] = -1;
  return;
}
void up1(int u, int l, int r, int q, int val) {
  if (l == r) {
    tree[u] = val;
    lazy[u] = -1;
    return;
  }
  push(u);
  int mid = (l + r) >> 1;
  if (q <= mid)
    up1(u * 2, l, mid, q, val);
  else
    up1(1 + u * 2, mid + 1, r, q, val);
}
long long get(int u, int l, int r, int q) {
  if (l == r) {
    return max(lazy[u], tree[u]);
  }
  push(u);
  int mid = (l + r) >> 1;
  if (q <= mid)
    return get(u * 2, l, mid, q);
  else
    return get(1 + u * 2, mid + 1, r, q);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  fill(lazy, lazy + N, -1);
  for (int i = 0; i < n; i++) cin >> tree[P + i];
  cin >> t;
  while (t--) {
    int q;
    cin >> q;
    if (q == 1) {
      int a, b;
      cin >> a >> b;
      a--;
      up1(1, 0, P - 1, a, b);
    } else {
      long long a;
      cin >> a;
      lazy[1] = max(lazy[1], a);
    }
  }
  for (int i = 0; i < n; i++) cout << get(1, 0, P - 1, i) << " ";
  return 0;
}
