Creating a counter-thought for a negative underlying belief

Let's continue with the example of the student who learns that several students failed an exam; he's upset, sure he failed too, even though he studied and had felt he did well.