#include using namespace std; #define ll long long #define slld(x) scanf("%lld", &x) #define nl printf("\n") #define plld(x) printf("%lld\n", x) #define pllds(x) printf("%lld ", x) #define fr(i, a, b) for(i=a; i #define pll pair #define vll vector #define vpll vector< pll > #define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++) #define clr(a) memset(a,0,sizeof(a)) #define all(v) v.begin(), v.end() #define MAX 100008 #define mod 1000000007 ll fpow(ll x, ll y) {ll r = 1; while(y > 0){if(y & 1) r = (r * x) % mod; y >>= 1; x = (x * x) % mod;} return r;} ll inv(ll n) {return fpow(n, mod-2);} ll add(ll x, ll y) { return ( (x%mod)+(y%mod) ) % mod; } ll sub(ll x, ll y) { return ( (x%mod)-(y%mod) + mod ) % mod; } ll mul(ll x, ll y) { return ( (x%mod)*(y%mod) ) % mod; } ll lcm(ll a, ll b) {return (a*b) / __gcd(a, b) ;} string s; ll m[MAX][28]; ll req[28]; ll fac[MAX]; ll each[28]; ll query(ll l, ll r){ ll ans = 0, len = 0, ones = 0, i; clr(req); for(i=0; i<26; i++){ if(l-1 >= 0) req[i] = m[r][i]-m[l-1][i]; else req[i] = m[r][i]; } bool ok = false; clr(each); for(i=0; i<26; i++){ if(req[i] & 1){ ok = true; ones++; } each[i] = req[i]/2; len += (req[i]/2); } ans = fac[len]; for(i=0; i<26; i++){ if(each[i]) ans = mul(ans, inv(fac[each[i]])); //pllds(i);plld(ans); } if(ok){ ans = mul(ans, ones); } return ans; } int main(){ ll n, i, j, k, t, a, b, _min, _max, l, r; fac[0] = 1; for(i=1; i<= 100001; i++) fac[i] = mul(fac[i-1], i); cin>>s; slld(t); for(i=0; i