Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/8
M:3/4
K:D
['Ac d2 ef de c3 e f2', 'f2 fg e3 c']  
X:1
L:1/8
M:3/4
K:D
 Ac d2 ef | de c3 e | f2 (3fef g>f | ec A4 | Ac d2 ef | de c3 e | f2 (3fef g>f |1 ec d4 :|2 
 ec d3 f || ec d2 fa | gb a2 f2 | fg e3 c | d2 e3 f | ec d2 fa | gb a2 f2 | fg e3 c |1 d2 d3 f :|2 
 d2 d4 |]  