Green synthesis of five- and six-membered heterocyclic systems in unconventional media