Milly is a very cool algorithmist. She likes to make new algorithms to solve real world scenarios. This time she is playing with strings and she is trying to produce some new concept out of it. She has developed a new concept of SPA which stands for STRING POINT AVERAGE. This concept is described below :
Suppose we have a string S, Then :
C[ch]: Count of a character ch in S,
W[ch]: Weight of the character ch,
TL: Total length of S and
TW: Total Weight of unique characters of S