Compose melodious music utilizing the prescribed letter representation and integrating the given thematic element.
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
['g f2 d edc d2 B AGF', 'afd ded gfg a2 f g2 a']  
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
 g | f2 d edc | d2 B AGF | GAB dAF | GEE E2 g | f2 d edc | d2 B AGF | GAB dAG | FDD D2 :| g | 
 afd ded | gfg a2 f | g2 a baf | gee efg |1 afd ded | gfg a2 f | g2 a bag | fdd d2 :|2 f2 d e2 c | 
 d2 B AGF | GAB eAG | FDD D3 |]  