#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
long long MOD = 998244353;
struct Edge {
  int src, dst;
  long long weight;
};
bool operator<(const Edge &e, const Edge &f) {
  return e.weight != f.weight ? e.weight > f.weight
         : e.src != f.src     ? e.src < f.src
                              : e.dst < f.dst;
}
vector<int> a;
int main() {
  int n, q;
  cin >> n;
  for (int(i) = 0; (i) < (int)(n); ++(i)) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  cin >> q;
  vector<pair<int, pair<int, int> > > data;
  for (int(i) = 0; (i) < (int)(q); ++(i)) {
    int num;
    int p, x;
    cin >> num;
    if (num == 1) {
      cin >> p >> x;
      p--;
      data.push_back(make_pair((num), (make_pair((p), (x)))));
    } else {
      cin >> x;
      data.push_back(make_pair((num), (make_pair((x), (0)))));
    }
  }
  vector<int> ans;
  for (int(i) = 0; (i) < (int)(n); ++(i)) ans.push_back(-1);
  int allm = -1;
  for (int i = q - 1; i >= 0; i--) {
    if (data[i].first == 2) {
      allm = max(allm, data[i].second.first);
    } else {
      if (ans[data[i].second.first] == -1) {
        if (allm < data[i].second.second) {
          ans[data[i].second.first] = data[i].second.second;
        } else {
          ans[data[i].second.first] = allm;
        }
      }
    }
  }
  for (int(i) = 0; (i) < (int)(n); ++(i)) {
    if (ans[i] == -1) {
      ans[i] = max(a[i], allm);
    }
    cout << ans[i] << " ";
  }
  cout << endl;
}
