#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
template <class T>
inline T read() {
  T x = 0, f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  };
  while (s >= '0' && s <= '9') {
    x = (x << 3) + (x << 1) + s - 48;
    s = getchar();
  };
  return x * f;
}
template <typename T>
inline void wri(T x) {
  if (x < 0) {
    x = -x;
    putchar('-');
  };
  if (x / 10) wri(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void print(T x, char s) {
  wri(x);
  putchar(s);
}
struct node {
  int l, r, val, add;
} e[800010];
int a[200010], ans[200010];
void build_tree(int node, int start, int end) {
  e[node].l = start, e[node].r = end;
  if (start == end) {
    e[node].add = 0;
    e[node].val = a[start];
    return;
  }
  int mid = (start + end) >> 1;
  build_tree(node << 1, start, mid), build_tree(node << 1 | 1, mid + 1, end);
}
void update(int x, int q, int val) {
  if (e[x].l == q && e[x].r == q) {
    e[x].val = val, e[x].add = 0;
    return;
  }
  int mid = (e[x].l + e[x].r) >> 1;
  e[x << 1].add = max(e[x << 1].add, e[x].add);
  e[x << 1 | 1].add = max(e[x << 1 | 1].add, e[x].add);
  e[x].add = 0;
  if (q <= mid)
    update(x << 1, q, val);
  else
    update(x << 1 | 1, q, val);
}
void query(int x) {
  if (e[x].l == e[x].r) {
    ans[e[x].l] = max(e[x].val, e[x].add);
    return;
  }
  e[x << 1].add = max(e[x << 1].add, e[x].add);
  e[x << 1 | 1].add = max(e[x << 1 | 1].add, e[x].add);
  query(x << 1), query(x << 1 | 1);
}
int main() {
  int n;
  n = read<int>();
  for (register int i = (1); i < (n + 1); i++) a[i] = read<int>();
  build_tree(1, 1, n);
  int q;
  q = read<int>();
  while (q--) {
    int x, y, z;
    x = read<int>();
    if (x == 1) {
      y = read<int>(), z = read<int>();
      update(1, y, z);
    } else
      y = read<int>(), e[1].add = max(e[1].add, y);
  }
  query(1);
  for (register int i = (1); i < (n + 1); i++) print(ans[i], ' ');
  return 0;
}
