Matryoshka: Learning to Drive Black-Box LLMs with LLMs