Construct a musical piece that integrates the provided motif and corresponds to the indicated musical structure.
X:1
L:1/8
Q:1/4=120
M:4/4
K:D
['A2 d2 d>d d>efe d>AF>A d2 e2', 'e2 A2 A>BA>B c>dc>d e>fe>f g2 f>e'  
X:1
L:1/8
Q:1/4=120
M:4/4
K:D
"^Maestoso" A2 | d2 d>d d>efe | d>AF>A d2 e2 | f2 f>f f>gag | f>ede f2 g2 | a2 a>a a=c'ba | 
 g2 g>g gbag | f>ed>e f>ag>f | e2 e>e e2 :: A2 | A>BA>B c>dc>d | e>fe>f g2 f>e | d>ed>e f>gf>g | 
 a>ba>b =c'2 ba | b>ge>b afde/f/ | (gf)(ed) (dc)(BA) | B>cd>e f>a a/g/f/e/ | d2 d>d d2 :|  