Complex sentence: Individual and pair entries are accepted, but all write the same paper for their grade.
Split into simpler sentences: Individual and pair entries are accepted. Pupils compete as individuals or in pairs, but all write the same paper for their grade.