#include <iostream> #include <string> #include<map> using namespace std; int main() { string s1,s2; map<int, int> map1; int n; int max1 = 0; while(cin>>s1>>n) { int arr[s1.size()]; for(int i=0;i<s1.s...