Here's your approach:
Read the input string.
Create an empty result string.
Loop through each character in the input.
Convert the character to lowercase.
Check if the lowercase character is a vowel (a, e, i, o, u, or y). If yes, skip to the next character.
If it's a consonant, append a dot to the result, then append the lowercase character.
After processing all characters, output the result. The approach is building the output incrementally. Don't try to modify the input string in place. Create a new string and append to it as you process each consonant.