One fine day, Mike, Jesse and Heisenberg went to deal with Gus Fring's assistant, Victor, on a place outside the borders of Albuquerque.
"Say My Name."
"Heisenberg."
"You're goddamn right."
They bring N cards along with them, with some special cards. Each card has a string of alphabets S written on it. A special card is a card in which the string is a Palindrome.
Victor is ready to give any amount of money to Jesse and Heisenberg in exchange of the secret blue meth formula. But Heisenberg rejects his offer.
"Stay out of my territory."
To make things interesting, Mike points a gun towards Victor and gives him a puzzle. He spreads out all the cards they brought and asks him to tell the number of possible pairs of special cards with the same first letter.
Can you save Victor's life?
INPUT
OUTPUT
All such possible pairs are -