The trick is that you need to filter out all vowels (a, e, i, o, u, both lowercase and uppercase) and add a '.' before each remaining consonant. First, convert the entire string to lowercase for uniform processing.
This way you only need to check against lowercase vowels. Then iterate through each character of the string. If the current character is a vowel, skip it entirely. If it's a consonant, append '.' followed by that character to your result string.
For example, "Tour" becomes ".t.r" after removing 'o' and 'u' and adding dots.