Which sentence is punctuated correctly?

A.the students line up in the afternoon to wait,for the buses arrive.
B.The students, line up in the afternoon, to wait for the buses to arrive.
C.The students line up in the afternoon to wait for the buses to arrive.
D.The students line up in the afternoon, to wait for the buses to arrive.

I'll check your answer if you indicate what you think.