Chintu was part of the Lolympics committee. He had a day off today, so, Chintu decided to watch the 42 km Marathon Finals with Mintu. They started to feel bored after a few minutes. So, they decided to play a game.
They decided a string of length L, and wrote the same string on their respective papers. The string consisted of only upper case letters. Once both of them had a paper with the same string, they started to pick a character from the mentioned string and match if it was same or not. Once an element of a string was picked, they discarded that from their respective strings.
You've to calculate the expected number of times the character both of them picked is same.
Input:
A single line consisting of a number T denoting the number of test cases.
Next T lines consisting of a string of length L having upper case letters.
Output:
Print the expected value upto six decimal places.
Constraints:
1 <= T <= 10
1 <= L <= 105