Compose melodies that adhere to the given musical framework, integrating the provided motif.
X:1
L:1/8
Q:1/2=60
M:4/4
K:G
['g>fg>a gfed']  
X:1
L:1/8
Q:1/2=60
M:4/4
K:G
 G2 | d>edB e>fg>e | d<BA>B G2 (d>ef/) | g>fg>a gfed | e>dg>B d3 d | g>fg>a gfed | e>dc>B e3 f | 
 g>fe>d e>fg3/2{ag}e | d<BA>B G2 |]  