Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:4/4
K:D
['d2 fd Adfe defg', '(3fga fd']  
X:1
L:1/8
M:4/4
K:D
 Ac | d2 fd Adfe | defg afdf | e2 ge Beed | cdef gece | d2 fd Adfe | defg afde | 
 (3fga fd (3fga fd | Bgec d2 :| cd | eAfA gAaA | faaf gfed | A2 BA cAdA | efed cABc | dAeA fAgA | 
 faaf gefd | (3fga fd (3fga fd | Bgec d2 ||  