Read the following text and you need to detect the errors in punctuation and grammar.
The man who was buying apples said " I'm going to eat them all
The man who was buying apples said, "I'm going to eat them all."
Complete the following task based on the instruction and optional input provided.### Instruction:
Read the following text and you need to detect the errors in punctuation and grammar.

### Input:
The man who was buying apples said " I'm going to eat them all

### Output:
The man who was buying apples said, "I'm going to eat them all."