#include <bits/stdc++.h>
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
using namespace std;
const int maxx = 2e5 + 10;
stack<pair<int, int> > lvl;
map<int, int> last;
long long dp[maxx + 5], arr[maxx + 5], id[maxx + 5], row[maxx + 5],
    rep[maxx + 5];
map<int, bool> used;
int main() {
  long long n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    arr[i] = x;
  }
  long long q;
  cin >> q;
  for (int i = 1; i <= q; i++) {
    long long sym, p = 0, idx, v;
    cin >> sym;
    if (sym == 1) {
      cin >> idx >> v;
      row[idx] = i;
      rep[idx] = v;
      used[idx] = true;
    } else {
      cin >> p;
    }
    id[i] = p;
  }
  long long best = 0;
  for (int i = q; i > 0; i--) {
    best = max(best, id[i]);
    id[i] = best;
  }
  for (auto x : used) {
    arr[x.first] = max(id[row[x.first]], rep[x.first]);
  }
  for (int i = 1; i <= n; i++) {
    if (i != 1) {
      cout << " ";
    }
    if (used[i]) {
      cout << arr[i];
    } else {
      arr[i] = max(arr[i], best);
      cout << arr[i];
    }
  }
  cout << endl;
  return 0;
}
