Compose melodious music utilizing the prescribed letter representation and integrating the given thematic element.
X:1
L:1/8
M:9/8
K:G
['(G2 B) (E2 B) (BAG)', '(g2 e)']  
X:1
L:1/8
M:9/8
K:G
 (G2 B) (E2 B) (BAG) | (F2 A) (D2 A) (AGF) | (G2 B) (E2 B) (BAG) | Bcd AGF E3 :| 
 (g2 e) (g2 e) (edB) | f2 d (ded) (fed) | (g2 e) (g2 e) edB | (dBG) (GBd) e3 | 
 (g2 e) (g2 e) (edB) | f2 d (ded) (fed) | (g2 e) (f2 ^d) (e=dB) | (BdB) (AGF) E3 ||  