Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
M:9/8
K:D
['a3 f2 d', 'a3 efg'  
X:1
L:1/8
M:9/8
K:D
 a3 f2 d e>cA | d3 B2 d cBA | B3 bag gfe | efg Bcd c3 | a3 f2 d ecA | d3 B2 d cde | d3 b2 a ^gfe | 
 afe dcB A3 :: e3 B2 d cBA | a3 efg f3 | a3 f2 e dcB | cde F^G^A B3 | d3 AB=c B2 z | e3 B^cd c3 | 
 a3 efg f2 a | Bgf edc d3 :|  