India used visits by leaders of Germany and Spain to balance ties in Europe