Compose a piece following the given musical structure and incorporating the provided motif.
X:1
L:1/8
M:4/4
K:G
['d2 B', 'e2 d'  
X:1
L:1/8
M:4/4
K:G
|: B2 Bd e d2 B | B d2 B AGGE | D B2 A BAGE | GABG BA A2 | B d2 e dBAG | BAGA GEDG | B2 BA G E2 D | 
 DEGA BG G2 :: Bdde c e2 d | B d2 B AGGE | DBBA Bdef | gedB BA A2 | Bdde d e2 d | BAGA GEDG | 
 B2 BA G E2 D | DEGA BG G2 :|  