added more robust test and solution for cases where there are multiple letters in a phrase occuring more than 2 times.