Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
M:2/2
K:D
['', 'd2 fd', 'g2 (dB) BgdB'  
X:1
L:1/8
M:2/2
K:D
 A |: d2 fd g2 fe | d2 fd e2 cA | d2 fd (ge)fd | egfa e2 (cA) :: g2 (dB) BgdB | g2 dB e2 cA | 
 g2 (dB) BgdB | A/A/A (af) e2 (cA) :|  