#include <bits/stdc++.h>
using namespace std;
const int N = 2e5, INF = 1e9 + 10;
int a[N + 1];
int last_update[N + 1];
int q;
int tree[4 * N + 100];
int arr[N + 1];
void update_vertex(int v, int vl, int vr) { tree[v] = max(tree[vl], tree[vr]); }
void build_tree(int v, int l, int r) {
  if (l + 1 == r) {
    tree[v] = arr[l];
  } else {
    int m = (l + r) / 2, vl = v * 2 + 1, vr = vl + 1;
    build_tree(vl, l, m);
    build_tree(vr, m, r);
    update_vertex(v, vl, vr);
  }
}
int get_tree(int v, int l, int r, int s, int e) {
  if (s == e) {
    return 0;
  } else if (l == s && r == e) {
    return tree[v];
  } else {
    int m = (l + r) / 2, vl = v * 2 + 1, vr = vl + 1;
    int x = get_tree(vl, l, m, min(s, m), min(m, e));
    int y = get_tree(vr, m, r, max(s, m), max(m, e));
    return max(x, y);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cin >> q;
  for (int i = 0; i < q; i++) {
    char com;
    cin >> com;
    if (com == '1') {
      int ind, x;
      cin >> ind >> x;
      a[ind] = x;
      last_update[ind] = i;
    } else {
      int x;
      cin >> x;
      arr[i] = x;
    }
  }
  build_tree(0, 0, q);
  for (int i = 1; i <= n; i++) {
    a[i] = max(a[i], get_tree(0, 0, q, last_update[i], q));
    cout << a[i] << " ";
  }
  return 0;
}
