Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
M:2/2
K:D
['ecAc dA (3AAA BGED CEAG']  
X:1
L:1/8
M:2/2
K:D
 D2 FA dDFA | dgfd ecAc | dA (3AAA BGED | CEAG FDEF | D2 FA dDFA | dgfd ecAc | dA (3AAA BGED | 
 CEAG FD D2 | defd fafd | gabg ecAc | defd fafd | efge fdec | defd fafd | gabg ecAc | 
 dA (3AAA BGED | CEAG FD D2 |]  