A.As long as the class finished, the students ran out, screamed and shouted.
B.No sooner did the class finish than the student ran out, screamed and shouted.
C.As soon as the class had finished, the student ran out, screamed and shouted.
D.If the class was over, the students would run out, scream and shout.