Compose a piece following the given musical structure and incorporating the provided motif.
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
['dAAB =c2 BA', 'ed cdef g2'  
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
 dc | dAAB =c2 BA | GEEG =c2 Bc | dAAB =c2 BA |1 GE=cE D2 :|2 GEEC D2 D |: A | dcde f2 ed | 
 cdef g2 fe | dcde f2 ed | efga fddA | dcde f2 ed | cdef g2 fg | afge fdec |1 dBAG FDD :|2 
"^last time" dBAG F2 E2 | D4 z4 |]  