#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const int MOD = 1000000007;
const long long INF = 1e18;
const int MX = 200005;
const long double PI = 4 * atan((long double)1);
template <class T>
void ckmin(T &a, T b) {
  a = min(a, b);
}
template <class T>
void ckmax(T &a, T b) {
  a = max(a, b);
}
long long a[MX];
long long tree[4 * MX], lazy[4 * MX];
void build(int v, int l, int r) {
  if (l == r) {
    tree[v] = a[l];
  } else {
    int m = (l + r) / 2;
    build(2 * v + 1, l, m);
    build(2 * v + 2, m + 1, r);
    tree[v] = max(tree[2 * v + 1], tree[2 * v + 2]);
  }
}
void update(int v, int l, int r, int ql, int qr, int x) {
  if (r < ql || l > qr) {
    return;
  }
  if (lazy[v] != 0) {
    tree[v] = max(tree[v], lazy[v]);
    if (l != r) {
      lazy[2 * v + 1] = max(lazy[v], lazy[2 * v + 1]);
      lazy[2 * v + 2] = max(lazy[v], lazy[2 * v + 2]);
    }
    lazy[v] = 0;
  }
  if (l >= ql && r <= qr) {
    tree[v] = max(tree[v], (long long)x);
    if (l != r) {
      lazy[2 * v + 1] = max(lazy[2 * v + 1], (long long)x);
      lazy[2 * v + 2] = max(lazy[2 * v + 2], (long long)x);
    }
    return;
  }
  int m = (l + r) / 2;
  update(2 * v + 1, l, m, ql, qr, x);
  update(2 * v + 2, m + 1, r, ql, qr, x);
  tree[v] = max(tree[2 * v + 1], tree[2 * v + 2]);
}
void update2(int v, int l, int r, int i, int x) {
  if (i > r || i < l) {
    return;
  }
  if (lazy[v] != 0) {
    tree[v] = max(tree[v], lazy[v]);
    if (l != r) {
      lazy[2 * v + 1] = max(lazy[v], lazy[2 * v + 1]);
      lazy[2 * v + 2] = max(lazy[v], lazy[2 * v + 2]);
    }
    lazy[v] = 0;
  }
  if (l == r) {
    tree[v] = x;
  } else {
    int m = (l + r) / 2;
    update2(2 * v + 1, l, m, i, x);
    update2(2 * v + 2, m + 1, r, i, x);
    tree[v] = max(tree[2 * v + 1], tree[2 * v + 2]);
  }
}
long long query(int v, int l, int r, int ql, int qr) {
  if (l > qr || r < ql) {
    return 0;
  }
  if (lazy[v] != 0) {
    tree[v] = max(tree[v], lazy[v]);
    if (l != r) {
      lazy[2 * v + 1] = max(lazy[v], lazy[2 * v + 1]);
      lazy[2 * v + 2] = max(lazy[v], lazy[2 * v + 2]);
    }
    lazy[v] = 0;
  }
  if (l >= ql && r <= qr) {
    return tree[v];
  } else {
    int m = (l + r) / 2;
    long long a = query(2 * v + 1, l, m, ql, qr);
    long long b = query(2 * v + 2, m + 1, r, ql, qr);
    return max(a, b);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (n); i++) cin >> a[i];
  build(0, 0, n - 1);
  int q;
  cin >> q;
  for (int i = 0; i < (q); i++) {
    int qt;
    cin >> qt;
    if (qt == 1) {
      int p, x;
      cin >> p >> x;
      p--;
      update2(0, 0, n - 1, p, x);
    } else {
      int x;
      cin >> x;
      update(0, 0, n - 1, 0, n - 1, x);
    }
  }
  for (int i = 0; i < (n); i++) {
    cout << query(0, 0, n - 1, i, i) << " ";
  }
}
