Codeforces problem a div 2 creating character

can anyone who is solving this problem tell me whats wrong with my approach
https://codeforces.com/contest/1217/submission/60131910