Develop a musical piece using the given theme and incorporating the letter-based structure provided.
X:1
L:1/8
M:4/4
K:D
['f2 df', 'D2 fgaf d4 fgaf g4 faab afdf', 'A2 fgaf d4 fgaf g3 a bgaf']  
X:1
L:1/8
M:4/4
K:D
 f2 df eBBA | Bdef g2 ag | f2 df eBBc | dBAF E2 D2 :| fgaf d4 | fgaf g4 | faab afdf | gefd B2 A2 || 
 fgaf d4 | fgaf g3 a | bgaf gfed | cdef g2 ag ||  