Synthesis of some novel pyridine and naphthyridine derivatives