#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const long long mod = 95542721;
inline long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) - '0' + ch;
    ch = getchar();
  }
  return x * f;
}
long long n, m;
long long sum[N << 2][49];
int lazy[N << 2];
int tr[N << 2];
void build(int rt, int l, int r) {
  if (l == r) {
    scanf("%lld", &sum[rt][0]);
    for (int i = 1; i <= 47; i++)
      sum[rt][i] = sum[rt][i - 1] * sum[rt][i - 1] % mod * sum[rt][i - 1] % mod;
    return;
  }
  int mid = l + r >> 1;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  for (int i = 0; i <= 47; i++)
    sum[rt][i] = sum[rt << 1][i] + sum[rt << 1 | 1][i];
}
void pushdown(int rt) {
  if (lazy[rt]) {
    lazy[rt << 1] = (lazy[rt << 1] + lazy[rt]) % 48;
    lazy[rt << 1 | 1] = (lazy[rt] + lazy[rt << 1 | 1]) % 48;
    tr[rt << 1] = (tr[rt << 1] + lazy[rt]) % 48;
    tr[rt << 1 | 1] = (tr[rt << 1 | 1] + lazy[rt]) % 48;
    lazy[rt] = 0;
  }
}
void update(int rt, int L, int R, int l, int r) {
  if (L <= l && R >= r) {
    lazy[rt] = (lazy[rt] + 1) % 48;
    tr[rt] = (tr[rt] + 1) % 48;
    return;
  }
  pushdown(rt);
  int mid = l + r >> 1;
  if (L <= mid) update(rt << 1, L, R, l, mid);
  if (R > mid) update(rt << 1 | 1, L, R, mid + 1, r);
  for (int i = 0; i <= 47; i++)
    sum[rt][i] = sum[rt << 1][(i + tr[rt << 1]) % 48] +
                 sum[rt << 1 | 1][(i + tr[rt << 1 | 1]) % 48];
  tr[rt] = 0;
}
long long query(int rt, int L, int R, int l, int r) {
  if (L <= l && R >= r) {
    return sum[rt][tr[rt]];
  }
  int mid = l + r >> 1;
  pushdown(rt);
  long long ans = 0;
  if (L <= mid) ans = (ans + query(rt << 1, L, R, l, mid)) % mod;
  if (R > mid) ans = (ans + query(rt << 1 | 1, L, R, mid + 1, r)) % mod;
  return ans;
}
int main() {
  n = read();
  build(1, 1, n);
  m = read();
  while (m--) {
    int op = read(), l = read(), r = read();
    if (op == 1) {
      printf("%lld\n", query(1, l, r, 1, n));
    } else {
      update(1, l, r, 1, n);
    }
  }
}
