I managed to solve the question till D but I'm stuck at the last reaction. I tried to find its solution and the source suggest it as
Upto (D) you are correct From there it's :
Upto D) you are absolutely correct. Now observe carefully. In D) you have imine groups as well as amide groups. Under basic conditions imines don't hydrolyse, but amides can undergo hydrolysis. So, the amide parts will hydrolyse and as the reagents are in excess, you will get the end product as
This is what I reffered frm book and conclude d..