Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/8
M:4/4
K:D
['A>Bd>e f>de>f', 'a>ba>f e>de>f']  
X:1
L:1/8
M:4/4
K:D
 d | A>Bd>e f>de>f | A/A/A A>F A2 (A<d) | A>Bd>e f>de>f | B/B/B d>A (B2 B) :| b | a>ba>f e>de>f | 
 A/A/A A>F A2 (A<d) | a>ba>f e>de>f | B/B/B d>A (B2 B)b | a>ba>f e>de>f | A/A/A A>F (A<d) | 
 A>Bd>e f>de>f | B/B/B d>A (B2 B) ||  