Unable to form the product formed via rearrangement

[![enter image description here](https://i.stack.imgur.com/dYYqQ.jpg)](https://i.stack.imgur.com/dYYqQ.jpg)


Ok so I first reacted one of the carbonyl groups with NH2OH to form an oxime. And then a Beckmann rearrangement takes place followed by tautomerism. Then the lone pair on nitrogen did an intramolecular attack on the other carbonyl to form a six membered ring.[![product image](https://i.stack.imgur.com/MmVZP.jpg)](https://i.stack.imgur.com/MmVZP.jpg) But I am unable to form the correct product which is option (A). Any help on how to proceed and is my approach correct?




Forget the Beckmann, the oxime is still nucleophilic through N (imagine the N-hydroxy enamine tautomer if that helps). Have it attack the second carbonyl intramolecularly (and hence favoured) to give a dihydropyridine. Dihydropyridines are unstable with respect to aromatisation unless substituted with strongly electron withdrawing groups. The N-hydroxy-dihydropyridine spontaneously will lose H2O to give the pyridine. 


 2