Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/8=232
M:4/4
K:D
['BA FA AB']  
X:1
L:1/8
Q:1/8=232
M:4/4
K:D
|: A2 | d3 A BA FA | AB dA BA FA | AB de fd ed | Be ed eg fe | d2 dA BA FA | AB dA BA FA | 
 AB de fd ec | dB AF D2 fg | a2 ag f2 fe | d2 dA BA FA | AB de fd ed | Be ed eg fe | ab ag fg fe | 
 d3 A BA FA | AB de fd ec | dB AF D2 :|  