#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int X = 0;
  register char ch = 0;
  while (ch < 48 || ch > 57) ch = getchar();
  while (ch >= 48 && ch <= 57) X = X * 10 + (ch ^ 48), ch = getchar();
  return X;
}
int n, m, a[200500 << 2];
void build(int l, int r, int num) {
  if (l == r) {
    a[num] = read();
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, num << 1);
  build(mid + 1, r, num << 1 | 1);
}
inline void _ladd(int num, int wfc) { a[num] = max(a[num], wfc); }
inline void ladd(int num) {
  if (a[num]) {
    _ladd(num << 1, a[num]);
    _ladd(num << 1 | 1, a[num]);
    a[num] = 0;
  }
}
int to, wfc;
void change(int l, int r, int num) {
  if (l == r) {
    a[num] = wfc;
    return;
  }
  ladd(num);
  int mid = (l + r) >> 1;
  if (to <= mid)
    change(l, mid, num << 1);
  else
    change(mid + 1, r, num << 1 | 1);
}
void dfs(int l, int r, int num) {
  if (l == r) {
    printf("%d ", a[num]);
    return;
  }
  ladd(num);
  int mid = (l + r) >> 1;
  dfs(l, mid, num << 1);
  dfs(mid + 1, r, num << 1 | 1);
}
int main() {
  n = read();
  build(1, n, 1);
  m = read();
  for (int i = 1, ord, x, y; i <= m; i++) {
    ord = read();
    x = read();
    if (ord == 1) {
      to = x;
      wfc = read();
      change(1, n, 1);
    } else
      _ladd(1, x);
  }
  dfs(1, n, 1);
  return 0;
}
