here is my code …!

import java.io.*;

class Attic

{

public static void main(String args[])throws IOException

{

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

```
int t,arr,days,max;
int[] a=new int[101];
int holes;
t=Integer.parseInt(br.readLine());
for(int k=0;k<t;k++)
{ max=0;
arr=0;
days=0;
holes=0;
String s=br.readLine();
for(int i=0;i<s.length();i++)
{
holes=0;
while(s.charAt(i)=='.')
{
i++;
holes++;
}
a[arr]=holes;
arr++;
}
for(int j=0;j<a.length-1;j++)
{
max=a[j];
if(a[j+1]>max)
{
max=a[j+1];
}
if(a[j]<max)
{
days++;
}
}
System.out.println(days);
}
```

}

}

i want to know y is it showing me wrong answer ?

Coz i have checked it like around 50 times with different inputs i get the correct answers !