#include #include #include #include typedef long long ll; using namespace std; const int MOD=1e9+7; ll powmod(ll a, ll k, ll mod){ ll ap=a, ans=1; while(k){ if(k&1){ ans*=ap; ans%=mod; } ap=ap*ap; ap%=mod; k>>=1; } return ans; } ll a[505], q[100010]; int dp[2][100010]; int main() { int n, k; ll b, p; scanf("%lld %d %d %lld", &p, &n, &k, &b); for(int i=0; i=MOD) dp[(i&1)^1][m]-=MOD; } } } printf("%d\n", dp[n&1][b]); return 0; }