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

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

Hi,

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