For this Question: Modulo exponentiation is super awesome. But can you still think of a solution to the following problem?
Given three integers {a, b, c}, find the value of a<sup>b<sup>c</sup></sup> % 1000000007.
Here a<sup>b</sup> means a raised to the power b or pow(a, b). Expression evaluates to pow(a, pow(b, c)) % 1000000007.

(Read Euler's Theorem before solving this problem)The first input line has an integer t: the number of test cases.
After this, there are n lines, each containing three integers a, b and c.


Constraints
1≤  t ≤ 100
0 ≤  a, b, c ≤ 1000000000For each test case, output the value corresponding to the expression.Sample Input
3
3 7 1
15 2 2
3 4 5

Sample Output
2187
50625
763327764

Explaination:
In the first test, a = 3, b = 7, c = 1
b<sup>c</sup> = 7<sup>1</sup> = 7
a<sup>b<sup>c</sup></sup> = 3<sup>7</sup> = 2187, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define mem(a, b) memset(a, (b), sizeof(a))
#define fore(i,a) for(int i=0;i<a;i++)
#define fore1(i,j,a) for(int i=j;i<a;i++)
#define print(ar) for(int i=0;i<ar.size();i++)cout<<ar[i]<<" ";
#define END cout<<'\n'
const double pi=acos(-1.0);

typedef pair<int, int> PII;

typedef vector<long long> VI;

typedef vector<string> VS;

typedef vector<PII> VII;

typedef vector<VI> VVI;

typedef map<int,int> MPII;

typedef set<int> SETI;

typedef multiset<int> MSETI;

typedef long int li;

typedef unsigned long int uli;

typedef long long int ll;

typedef unsigned long long int  ull;
ll fastexp (ll a, ll b, ll n) {
  ll res = 1;
  while (b) {
      if (b & 1) res = res*a%n;
      a = a*a%n;
      b >>= 1;
  }
  return res;
}
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int main()
 { 
     fast();
 ll a,b,c;
	int t, n, k;
	cin >> t;
	while(t--) {
	    cin >> a >>b >>c;
     ll mod = 1e9+7;
     ll k = fastexp(b,c,mod-1);
     ll ans= fastexp(a,k,mod);
cout<<ans<<endl;

	}}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?