#include <bits/stdc++.h>
using namespace std;
inline void read(int &first) {
  register int c = getchar();
  first = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    first = (first << 1) + (first << 3) + c - 48;
  }
  if (neg) first = -first;
}
inline void read(long long &first) {
  register int c = getchar();
  first = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    first = (first << 1) + (first << 3) + c - 48;
  }
  if (neg) first = -first;
}
inline void writeln(long long first) {
  char buffor[21];
  register int i = 0;
  int neg = 0;
  if (first < 0) {
    neg = 1;
    first = -first;
  }
  do {
    buffor[i++] = (first % 10) + '0';
    first /= 10;
  } while (first);
  i--;
  if (neg) putchar('-');
  while (i >= 0) putchar(buffor[i--]);
  putchar('\n');
}
inline void write(long long first) {
  char buffor[21];
  register int i = 0;
  int neg = 0;
  if (first < 0) {
    neg = 1;
    first = -first;
  }
  do {
    buffor[i++] = (first % 10) + '0';
    first /= 10;
  } while (first);
  i--;
  if (neg) putchar('-');
  while (i >= 0) putchar(buffor[i--]);
  putchar(' ');
}
const int N = 2e5 + 7;
int n, q;
int a[N], p[N], first[N], type[N], res[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  read(n);
  for (int i = 1; i <= n; i++) read(a[i]);
  memset(res, -1, sizeof(res));
  read(q);
  for (int i = 1; i <= q; i++) {
    read(type[i]);
    if (type[i] == 1) {
      read(p[i]);
      read(first[i]);
    } else
      read(first[i]);
  }
  int mx = -1;
  for (int i = q; i >= 1; i--) {
    if (type[i] == 1) {
      if (res[p[i]] != -1) continue;
      if (mx >= first[i])
        res[p[i]] = mx;
      else
        res[p[i]] = first[i];
    } else
      mx = max(mx, first[i]);
  }
  for (int i = 1; i <= n; i++)
    if (res[i] == -1) res[i] = max(a[i], mx);
  for (int i = 1; i <= n; i++) write(res[i]);
}
