///Construct the Array ///https://www.hackerrank.com/contests/101hack52/challenges/construct-the-array/problem #include #define MOD 1000000007 using namespace std; typedef long long ll; int n,k,x; ll ans=1; long long pow(ll a, ll b) { long long x=1,y=a; while(b > 0) { if(b%2 == 1) { x=(x*y); if(x>MOD) x%=MOD; } y = (y*y); if(y>MOD) y%=MOD; b /= 2; } return x; } int main() { ios_base::sync_with_stdio(0); cin>>n>>k>>x; ll now,sol; if(x==1) sol=k-1; else sol=k-2; now=sol; if(n==3) { cout<