#include #include #define ft first #define sc second #define pt(sth) cout << sth << "\n" #define chmax(a, b) (a)=max(a, b) #define chmin(a, b) (a)=min(a, b) #define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD using namespace std; typedef long long ll; typedef pair pll; static const ll INF=1e18; static const ll MAX=101010; static const ll MOD=1e9+7; /* for(i=0; i> a[i]; */ int main(void) { ll i, j, k; char s[111]; fgets(s, 105, stdin); ll e[26]={}; ll N=strlen(s)-1; for(i=1; i