#include <bits/stdc++.h>
using namespace std;
struct query {
  long long int type, a, b;
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    for (long long int i = 0; i < n; i++) cin >> arr[i];
    long long int q;
    cin >> q;
    vector<query> que;
    for (long long int i = 0; i < q; i++) {
      query h;
      cin >> h.type;
      if (h.type == 1)
        cin >> h.a >> h.b;
      else {
        cin >> h.a;
        h.b = 0;
      }
      que.push_back(h);
    }
    reverse(que.begin(), que.end());
    long long int maxi = INT_MIN;
    bool visited[n];
    memset(visited, false, sizeof(visited));
    for (long long int i = 0; i < q; i++) {
      if (que[i].type == 1 && !visited[que[i].a - 1]) {
        arr[que[i].a - 1] = max(que[i].b, maxi);
        visited[que[i].a - 1] = true;
      } else if (que[i].type == 2)
        maxi = max(maxi, que[i].a);
    }
    for (long long int i = 0; i < n; i++) {
      if (arr[i] < maxi && !visited[i]) arr[i] = maxi;
      cout << arr[i] << " ";
    }
  }
  return 0;
}
