i need soluton about this problem. My problem is here , i submitted my code to codeforces , they expected the result could be ".t.r," but they found my code's result is ".t.r." my code is here so please fix the problem

$yourString = fgets(fopen("php://stdin","r"));
$vowels = array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U", " ");
$yourString = str_replace($vowels,"", $yourString);
for($i=0;$i<($ri - 1);$i++){
    echo ".".$yourString[$i];
echo "\n";}


I do not see the conditional statement to apply the comma. Do you have an example of the input?