Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
M:4/4
K:D
['AFEF D2']  
X:1
L:1/8
M:4/4
K:D
|: d2 FB AFEF | D2 dc BABc | dF F2 AF F2 | AFEF D2 fe | d2 FB AFEF | D2 dc BABc | dF F2 AF F2 | 
 AFEF D4 |:  