Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
M:4/4
K:D
['D2 FD A,DFA', 'd2 fd AF F2 DFAd fagf'  
X:1
L:1/8
M:4/4
K:D
 D2 FD A,DFA | dcBA ^GAFD | E2 GE B,EGB | gecA ^GA=GE | D2 FD A,DFA | dDcD BDAf | gee^d ecdB | 
 AFGE D4 :| d2 fd AF F2 | DFAd fagf | efge BGED | CEAc egfe | d2 fd AF F2 | DFAd fagf | geed ecdB | 
 AFGE D4 :|  