Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
Q:1/4=140
M:4/4
K:D
['(3ABc d>cd>A F>Ad>f e>dc>B A2 g2 f>ga>g', 'd2 (fg) a>fa>f d>fa>f b>gb>g e>fg>e a>fa>f'  
X:1
L:1/8
Q:1/4=140
M:4/4
K:D
 (3ABc | d>cd>A F>Ad>f | e>dc>B A2 g2 | f>ga>g b>ge>c | d>cd>f e>c (3ABc | d>cd>A F>Ad>f | 
 e>dc>B A2 g2 | f>ga>g b>ge>c | d2 f2 d2 :: (fg) | a>fa>f d>fa>f | b>gb>g e>fg>e | a>fa>f b>ag>f | 
 e>dc>B A>gf>e | d>cd>A F>Ad>f | e>dc>B A>ce>g | f>ga>f b>ge>c | d2 f2 d2 :|  