2016 AIME II Problem 6

For polynomial P(x)=1-\frac{1}{3} x+\frac{1}{6} x^{2}, define

Q(x)=P(x) P\left(x^{3}\right) P\left(x^{5}\right) P\left(x^{7}\right) P\left(x^{9}\right)=\sum_{i=0}^{50} a_{i} x^{i}

Then \sum_{i=0}^{50}\left|a_{i}\right|=\frac{m}{n}, where m and n are relatively prime positive integers. Find m+n.