Extract selection after flattening?

I’m trying to generate SVGs of letters with different paths to animate the stroke order.

For the letter “A”, after flattening it, I get this :
LETTER A

How can I split the letter into 3 differents layers ?