Edit the following sentence: 'He realized he master the subject'
He realized he had mastered the subject.
Complete the following task based on the instruction and optional input provided.### Instruction:
Edit the following sentence: 'He realized he master the subject'

### Output:
He realized he had mastered the subject.