Synthesis of five and six membered rings with one or two nitrogen atoms in search of anti-cancer and anti-aids agents