Transmission cooling lines

Have you heard of a "Crowsfoot" wrench?
Made just for that kind of situation.

Specifically, you want a Crowsfoot line wrench.
They look like this.
Or. you could crimp the line right at the nut with wire cutters the snap the lines off the trans then use a socket like Magnum said.