func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, a, b, c, val;   vector<vector<long long>> F1;   vector<vector<long long>> getNewMat() {     vector<vector<long long>> ans;     ans.resize(3 + 1);     for (auto &it : ans) it.resize(3 + 1);     return ans;   }   vector<vector<long long>> mult(vector<vector<long long>> A,                                  vector<vector<long long>> B) {     vector<vector<long long>> C;     C.resize(3 + 1);     for (long long i = 1; i <= 3; i++) C[i].resize(3 + 1);     for (long long i = 1; i <= 3; i++) {       for (long long j = 1; j <= 3; j++) {         for (long long k = 1; k <= 3; k++) {           C[i][j] = (C[i][j] + A[i][k] * B[k][j]) % (1000000007 - 1);         }       }     }     return C;   }   vector<vector<long long>> _pow(vector<vector<long long>> mat, long long x) {     if (x == 1) return mat;     vector<vector<long long>> ansM = _pow(mult(mat, mat), x / 2);     if (x % 2) return mult(ansM, mat);     return ansM;   }   long long __pow(long long a, long long b) {     if (b == 0) return 1LL;     if (b == 1) return a;     if (b % 2) return __pow(a * a % 1000000007, b / 2) * a % 1000000007;     return __pow(a * a % 1000000007, b / 2) % 1000000007;   }   int main() {     ios::sync_with_stdio(false);     cin >> n >> a >> b >> c >> val;     F1 = getNewMat();     F1[1][1] = F1[1][2] = F1[1][3] = F1[2][1] = F1[3][2] = 1;     if (n < 4) {       if (n == 1) cout << a <<   n ;       if (n == 2) cout << b <<   n ;       if (n == 3) cout << c <<   n ;       return 0;     }     long long ans = 1;     F1 = _pow(F1, n - 3);     a = a * val % 1000000007;     b = b * __pow(val, 2) % 1000000007;     c = c * __pow(val, 3) % 1000000007;     ans = __pow(a, (F1[1][3])) * __pow(b, (F1[1][2])) % 1000000007;     ans = ans * __pow(c, (F1[1][1])) % 1000000007;     val = __pow(val, n);     val = __pow(val, 1000000007 - 2);     ans = ans * val % 1000000007;     cout << ans <<   n ;     return 0;   }   