classSolution { public: int mod = 1337; intmyPow(int a, int k){ a = a%mod; int ret =1; for(int i=0;i<k ; ++i) ret = (ret*a) %mod; return ret; } intsuperPow(int a, vector<int>& b){ if(b.empty()) return1; int x = b.back(); b.pop_back(); int part1 = myPow(a,x); int part2 = myPow(superPow(a,b),10); return part1 *part2%mod; } };