What happens when all reference bits set to 1 in Second Chance Page Replacement Algorithm? I have a sequence like 5577334... and there are 3 frames available.

After the 6th clock, all pages (5, 7 and 3) will have their reference bits set to 1. 
Now, when 4 comes in, 5 will go even though its reference bit is 1 because of the FIFO rule but what happens 7 and 3' referance bits? Do they stay as 1? or Is 7's reference bit set to 0 since there is FIFO rule? or Are both 7 and 3' referance bits set to 0?
Well, I found the answer in a textbook which is saying since there is a pointer looking for a page whose reference bit is 0, it will traverse the circular queue setting all reference bits to 0 and replacing the page who came first like FIFO.