Compose a piece of music that follows the specified structure and incorporates the given theme.
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
['e fef def gfg e2 g', 'd2 B Add dcd fdc d2 A'  
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
 e | fef def | gfg e2 g | fdc def | ecB A2 e | fef def | gfg e2 g | fdB ABd | e3 d2 :| B | 
 Add dcd | fdc d2 A | B2 A Bcd | ecB A2 e | f3 ede | fef d2 e | fdB ABd | e3 d2 :|  