#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e5;
long long int modexp(long long int a, long long int b, long long int p) {
  if (a == 0) {
    return 0;
  }
  if (b == 0) {
    return 1;
  }
  if (b % 2 == 0) {
    long long int res = modexp(a, b / 2, p) % p;
    return (res % p * res % p) % p;
  } else {
    return (a % p * modexp(a, b - 1, p) % p) % p;
  }
}
long long int modinverse(long long int a, long long int p) {
  return modexp(a, p - 2, p);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  long long int arr[n + 1];
  for (int i = 1; i <= n; i++) cin >> arr[i];
  int q;
  cin >> q;
  long long int maxi = 0, check = 0;
  vector<pair<long long int, pair<long long int, long long int> > > v;
  while (q--) {
    int x;
    cin >> x;
    if (x == 1) {
      long long int a, b;
      cin >> a >> b;
      v.push_back({1, {a, b}});
    } else {
      long long int a;
      cin >> a;
      v.push_back({2, {0, a}});
    }
  }
  long long int brr[n + 1];
  memset(brr, 0, sizeof(brr));
  for (int i = v.size() - 1; i >= 0; i--) {
    if (v[i].first == 2) {
      maxi = max(maxi, v[i].second.second);
    } else {
      v[i].second.second = max(maxi, v[i].second.second);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (arr[i] < maxi) {
      arr[i] = maxi;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i].first == 1) {
      arr[v[i].second.first] = v[i].second.second;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
  return 0;
}
