Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['d2 F>G A>FA>F', 'f2 d>f d>fd>f'  
X:1
L:1/8
M:4/4
K:D
|: A2 | d2 F>G A>FA>F | d2 F>G A>FA>F | B>AG>F E2 e>f | g>fe>d c>AB>c | d2 F>G A>FA>F | 
 d2 F>G A>FA>F | B>AG>F E2 e>g | f>de>c d2 :: d>e | f2 d>f d>fd>f | e2 c>e c>ec>e | f2 d>f d>fd>f | 
 e>dc>B A2 B>c | d>Bd>B c>Ac>A | d>Bd>B c>Ac>A | a>fg>e f>de>c | d2 d2 d2 :|  