#include<bits/stdc++.h> using namespace std; int main(){ char a[30]; int b[30]={0}; cin>>a; int i=0,n=0; n=strlen(a); for(i=0;i<n-1;i++){ b[a[i]-'a']++; } for(i=0;i<26;i++){ if(b[i]>0) cout<<char(i+'a'); } cout<<endl; for(i=0;i<26;i++){ if(b[i]>0) cout<<b[i]; } } /************************************************************** Problem: 1177 User: wengsihan Language: C++ Result: Accepted Time:7 ms Memory:2072 kb ****************************************************************/