Read the sentence below to find out whether there is any grammatical error in it. The error, if any, will be in one part of the sentence. Choose the option with that part as your answer. If there is no error, choose 'D' as your answer. (Ignore the errors of punctuation, if any).

Having received your letter this morning, we are writing to thank you for the same.

A.

Having received your letter

B.

this morning, we are writing

C.

to thank you for the same.

D.

No error.

Correct answer is D

No explanation has been provided for this answer.