#include using namespace std; int main(){ int a[30]={0}; for(int i=0; i<26; i++)cin>>a[i]; string str="";cin>>str; int mx = 0; for(int i=0; i