As far as

bills are concerned you will get them at almost every ATM of the big banks.
Commerzbank definitely has them in almost every one of their ATMs
Here's a complete list of all of its branches:
https://www.commerzbank.de/filialen/de/ ... sicht.html
You probably won't get them at "cashzone" ATMs which can be frequently found in shops and train stations.
As far as

are concerned it is a bit harder to get them. Some branches of Deutsche Bank, Sparkasse or Volksbank have them.
The problem is that very often the denomination of banknotes in the ATM is not indicated on its outside. Don't be surprised if the staff doesn't know it either.
Also it appears that with a card of a foreign bank you are not able to choose the denomination.
I can recommend you the local branch of the German central bank "Bundesbank". You can change as many

as you want to. The service is for free. I go there quite often. It is however recommendable to stay below 10.000€.
So how about first getting some

s from a cashmachine, then you take them to the German Bundesbank together with some notes from Spain to get some

?
By the way, it is also possible to go there twice on another day. I once did so in Munich.
Here's the address:
https://www.bundesbank.de/de/bundesbank ... ain-605800
In Frankfurt you need an appointment. This is quickly done via their website.