func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long mod = 1000000007;   long long n, f1, f2, f3, c, ans, t1[3], t2[5], aa1[3][3], aa2[5][5],       a1[3][3] = {{0, 0, 1}, {1, 0, 1}, {0, 1, 1}},       a2[5][5] = {{0, 0, 1, 0, 0},                   {1, 0, 1, 0, 0},                   {0, 1, 1, 0, 0},                   {0, 0, 1, 1, 0},                   {0, 0, 0, 1, 1}},       ans1[3], ans2[3], ans3[3], ans4[5];   long long kp(long long a, long long b) {     if (b == 0) return 1;     long long c = kp(a, b >> 1);     c = (c * c) % mod;     if (b & 1) c = (c * a) % mod;     return c;   }   int main() {     scanf( %lld%lld%lld%lld%lld , &n, &f1, &f2, &f3, &c);     ans1[0] = ans2[1] = ans3[2] = 1;     ans4[4] = ans4[3] = 2;     for (long long x = n - 3; x; x >>= 1) {       if (x & 1) {         for (int i = 0; i < 3; i++) t1[i] = ans1[i], ans1[i] = 0;         for (int i = 0; i < 3; i++)           for (int j = 0; j < 3; j++)             ans1[i] = (ans1[i] + t1[j] * a1[j][i]) % (mod - 1);         for (int i = 0; i < 3; i++) t1[i] = ans2[i], ans2[i] = 0;         for (int i = 0; i < 3; i++)           for (int j = 0; j < 3; j++)             ans2[i] = (ans2[i] + t1[j] * a1[j][i]) % (mod - 1);         for (int i = 0; i < 3; i++) t1[i] = ans3[i], ans3[i] = 0;         for (int i = 0; i < 3; i++)           for (int j = 0; j < 3; j++)             ans3[i] = (ans3[i] + t1[j] * a1[j][i]) % (mod - 1);         for (int i = 0; i < 5; i++) t2[i] = ans4[i], ans4[i] = 0;         for (int i = 0; i < 5; i++)           for (int j = 0; j < 5; j++)             ans4[i] = (ans4[i] + t2[j] * a2[j][i]) % (mod - 1);       }       for (int i = 0; i < 3; i++)         for (int j = 0; j < 3; j++) aa1[i][j] = a1[i][j], a1[i][j] = 0;       for (int i = 0; i < 3; i++)         for (int j = 0; j < 3; j++)           for (int k = 0; k < 3; k++)             a1[i][j] = (a1[i][j] + aa1[i][k] * aa1[k][j]) % (mod - 1);       for (int i = 0; i < 5; i++)         for (int j = 0; j < 5; j++) aa2[i][j] = a2[i][j], a2[i][j] = 0;       for (int i = 0; i < 5; i++)         for (int j = 0; j < 5; j++)           for (int k = 0; k < 5; k++)             a2[i][j] = (a2[i][j] + aa2[i][k] * aa2[k][j]) % (mod - 1);     }     ans = kp(f1, ans1[2]) * kp(f2, ans2[2]) % mod * kp(f3, ans3[2]) % mod *           kp(c, ans4[2]) % mod;     printf( %lld , ans);   }   