#include <bits/stdc++.h>
using namespace std;
long long int cost[300000];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  for (long long int i = 1; i <= n; i++) cin >> cost[i];
  long long int q;
  cin >> q;
  long long int brr[q + 3];
  long long int mx[q + 3];
  mx[q + 1] = 0;
  vector<pair<long long int, pair<long long int, long long int>>> arr;
  while (q--) {
    long long int x;
    cin >> x;
    if (x == 1) {
      long long int y, z;
      cin >> y >> z;
      arr.push_back(make_pair(x, make_pair(y, z)));
    } else {
      long long int y;
      cin >> y;
      arr.push_back(make_pair(x, make_pair(y, 0)));
    }
  }
  long long int vis[n + 2];
  long long int pos[n + 2];
  memset(vis, -1, sizeof(vis));
  memset(pos, -1, sizeof(pos));
  long long int cnt = 0;
  for (long long int i = 0; i < arr.size(); i++) {
    cnt++;
    if (arr[i].first == 1) {
      vis[arr[i].second.first] = arr[i].second.second;
      pos[arr[i].second.first] = cnt;
    }
  }
  for (long long int i = arr.size() - 1; i >= 0; i--) {
    if (arr[i].first == 2)
      mx[i + 1] = max(mx[i + 2], arr[i].second.first);
    else
      mx[i + 1] = mx[i + 2];
  }
  for (long long int i = 1; i <= n; i++) {
    if (vis[i] != -1) {
      cout << max(vis[i], mx[pos[i]]) << "\n";
    } else {
      cout << max(cost[i], mx[1]) << "\n";
    }
  }
}
