Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:6/8
K:D
['dcd GBd =cBc', 'B2 B'  
X:1
L:1/8
M:6/8
K:D
 dcd GBd | =cBc ABc | dcd GBd | =cBc A3 | dcd GBd | =cBc ABc | AB=c ed^c | d6 ::[K:G] B2 B B2 B | 
 A2 G FGA | B2 B B2 B | cBc ABc | B2 B B2 B | A2 G FGA | c3 cde | A6 :|  