#include using namespace std; //#include //using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 1000000 #define MOD 1000000007 //#define INF 1000000000 #define INF 1000000000000000000 int main(){ ll N; cin>>N; vector pows((int)N-1); for(ll i=0;i