Brain-Teaser 848: The magic class

From The Sunday Times, 16th October 1977 [link]

The class only had nine pupils.

Three girls sat in the front row, three boys in the back one, while in the middle rows the sexes sat alternately.

Altogether, including the teacher, the sexes were equally divided.

When their home-work was returned marks were compared and the children were surprised to discover that the total marks gained by those in each row were the same, as were also those for each column from front to back and for each diagonal of the square in which they sat. Excitedly they pointed out that fact to the teacher who replied that, when checking their work, which had been marked out of ten, he noticed that every digit had been used once and once only.

Three was the lowest mark awarded to a girl.

What was the highest mark given to a boy?

This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 1 (1980). The puzzle text above is taken from the book.

[teaser848]