Construct a musical composition utilizing the provided motif and conforming to the specified structure.
X:1
L:1/4
M:4/4
K:D
['e f', 'e f'  
X:1
L:1/4
M:4/4
K:D
 f f f2 | e f d c/d/ | e e e f | e2 e2 :: B c d2 | e f d c/d/ | e e e f | e2 d2 :|  