Ответ:

When I entered the classroom, the teacher was writing words on the blackboard and the pupils were copying them into their exercise books.