Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
M:2/2
K:D
['', 'A2 (AB) AFED', 'f2 fd'  
X:1
L:1/8
M:2/2
K:D
 B |: A2 (AB) AFED | B2{c} BA BcdB | A2 (AB) AFED | gfed BcdB | A2 (AB) AFED | B2{c} BA BcdB | 
 A2 (AB) AFED | gfed Bcde || f2 fd g2 ge | f2 fd Bcde | f2 fd g2 fg | afed Bcde | f2 fd g2 ge | 
 f2 fd Bcde | defg afbf |1 gfed BcdB :|2"^(Last Time)" eABc d2 |]  