#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(T &x) {
  x = 0;
  int f = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    f |= (ch == '-'), ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  }
  return x = f ? -x : x;
}
struct Query {
  char ch;
  int person = -1;
  int type_1_x = -1;
  int type_2_x = -1;
};
int main(void) {
  int n;
  read(n);
  vector<pair<int, bool> > input(n);
  for (int i = 0; i < n; i++) {
    cin >> input[i].first;
    input[i].second = true;
  }
  int q;
  read(q);
  Query Q[q];
  for (int i = 0; i < q; i++) {
    char abcd;
    cin >> abcd;
    if (abcd == '1') {
      int p, x;
      read(p), read(x);
      Q[i].ch = abcd, Q[i].person = p, Q[i].type_1_x = x;
    } else {
      int xx;
      read(xx);
      Q[i].ch = abcd, Q[i].type_2_x = xx;
    }
  }
  int x_max = INT_MIN;
  for (int i = q - 1; i >= 0; i--) {
    if (Q[i].ch == '1' && input[Q[i].person - 1].second == true) {
      input[Q[i].person - 1].second = false;
      input[Q[i].person - 1].first = max(x_max, Q[i].type_1_x);
    } else {
      x_max = max(x_max, Q[i].type_2_x);
    }
  }
  for (int i = 0; i < n; i++) {
    if (input[i].second == true) {
      if (input[i].first < x_max)
        cout << x_max << " ";
      else
        cout << input[i].first << " ";
    } else
      cout << input[i].first << " ";
  }
  return 0;
}
