#include #include #include using namespace std; const int maxn=100010; const int hzy=10007; const int inf=(1<<30)-1; typedef long long ll; char s[maxn]; int c[maxn]; int tot=0; int vis[maxn]; int main() { while(scanf("%s",s)==1){ int n=strlen(s); memset(c,0,sizeof(c)); memset(vis,0,sizeof(vis)); tot=0;int ok=0; int flag=0; char last=s[0]; c[++tot]=1; vis[last]=1; for(int i=1;i