#include <bits/stdc++.h>
using namespace std;
const long long MOD = (1e9) + 7;
const long double EPS = 0.0000001;
const int N = 200000 + 5000;
long long lst[N];
long long tree[4 * N];
long long arr[N];
long long query(int node, int l, int r, int a, int b) {
  if (l > r || a > b || l > b || r < a) return 0;
  if (a <= l && r <= b) return tree[node];
  int mid = (l + r) / 2;
  return max(query(node + node, l, mid, a, b),
             query(node + node + 1, mid + 1, r, a, b));
}
void update(int node, int l, int r, int a, int val) {
  if (l > r || a > r || a < l) return;
  if (l == r) {
    tree[node] = val;
    return;
  }
  int mid = (l + r) / 2;
  update(node + node, l, mid, a, val);
  update(node + node + 1, mid + 1, r, a, val);
  tree[node] = max(tree[node + node], tree[node + node + 1]);
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 1; i <= n; i++) lst[i] = 0;
  int q;
  cin >> q;
  int cnt = 0;
  for (int i = 0; i < q; i++) {
    int tp;
    cin >> tp;
    if (tp == 1) {
      int p, x;
      cin >> p >> x;
      arr[p] = x;
      lst[p] = cnt;
    } else {
      int x;
      cin >> x;
      cnt++;
      update(1, 1, N, cnt, x);
    }
  }
  for (int i = 1; i <= n; i++) {
    arr[i] = max(arr[i], query(1, 1, N, lst[i] + 1, cnt));
  }
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  return 0;
}
