Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:6/8
K:G
['B BAG', 'g gdB c2'  
X:1
L:1/8
M:6/8
K:G
|: D | G2 B BAG | D2 B BAG | E2 c cGE | FAd DEF | G2 B BAG | D2 B BAG | E2 c FAd | AGF G2 :: A | 
 B2 B BAG | B2 g gdB | c2 g gdB | c2 c ABc | B2 B BAG | B2 g gdB | c2 G A2 B | AGF G2 :|  