Structure and magnetic properties of linear-chain complexes of rare-earth ions (gadolinium, europium) with nitronyl nitroxides