Develop a musical piece using the given theme and incorporating the letter-based structure provided.
X:1
L:1/8
M:2/2
K:D
['AFEF D2 FA BAFB', 'g2 eg']  
X:1
L:1/8
M:2/2
K:D
 d2 dA BAFB | A3 B AFEF | D2 FA BAFB | ABde feef | dA A2 BAFB | AFBF AFEF | D2 FA BAFB |1 
 ABde fddA :|2 ABde fd d2 |: dD D2 dDFA | dcde fdef | g2 eg fedf | e3 f edBc | dD D2 dDFA | 
 dcde fdef |1 g2 eg fdec | AFGE EDFA :|2 g2 eg fdfa | gabg effe ||  