func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long M = 1000 * 1000 * 1000 + 7;   const int INF = 0x3f3f3f3f;   const int MAX = 200009;   long long n, f1, f2, f3, c;   vector<vector<long long> > operator*(const vector<vector<long long> > &a,                                        const vector<vector<long long> > &b) {     vector<vector<long long> > t(3, vector<long long>(3, 0));     for (int i = 0; i < 3; i++)       for (int j = 0; j < 3; j++)         for (int k = 0; k < 3; k++)           t[i][j] = (t[i][j] + a[i][k] * b[k][j]) % (M - 1);     return t;   }   vector<vector<long long> > mat_pow(vector<vector<long long> > a, long long b) {     vector<vector<long long> > c(3, vector<long long>(3, 0));     for (int i = 0; i < 3; i++) c[i][i] = 1;     while (b) {       if (b & 1) c = c * a;       a = a * a;       b >>= 1;     }     return c;   }   long long ll_pow(long long a, long long b) {     long long res = 1;     while (b) {       if (b & 1) res = (res * a) % M;       a = (a * a) % M;       b >>= 1;     }     return res;   }   int main() {     while (cin >> n >> f1 >> f2 >> f3 >> c) {       vector<vector<long long> > a{{0, 1, 0}, {0, 0, 1}, {1, 1, 1}};       a = mat_pow(a, n - 3);       long long ans = ll_pow(f1 * c % M, a[2][0]) *                       ll_pow(f2 * c % M * c % M, a[2][1]) % M *                       ll_pow(f3 * c % M * c % M * c % M, a[2][2]) % M *                       ll_pow(ll_pow(c, n), M - 2) % M;       cout << ans << endl;     }     return 0;   }   