The problem is in the line:
Site S[]= new Site[100];
For each iteration you create a new array, so at the end it is only filled with null pointers. When you try to access the s[0] it is going to give you null pointer on second iteration.
That is why it first prints, but the second time you get a null pointer. First time the s[0] has a value, the second time it does not.