Rolling a die $1000$ times, there is a time interval such that the product of all the results in that interval is a cube of $3$. Each of the six faces of a die is marked with an integer, not necessarily positive. The die is rolled $1000$ times. Show that there is a time interval such that the product of all rolls in this interval is a cube of an integer. (For example, it could happen that the product of all outcomes between 5th and 20th throws is a cube; obviously, the interval has to include at least one throw!)
I looked at abcdef as a possible product , somehow $1000$ of these 'terms' no matter how we shuffle them , a product like ababab or adadad or acdacdacd will be in the string but i cant prove how :(
 A: Strengthening the result another way:
For each $i=1,\dots,1000$ let $2^{a_i}\cdot 3^{b_i}\cdot 5^{c_i}$ be the product of the first $i$ rolls. Then there are only $3^3=27$ possible values for the 3-tuple $(a_i\bmod 3, b_i\bmod 3, c_i\bmod 3)$, so, by a pigeonhole principle argument similar to Mike Earnest's in his answer, a cube must appear if there are more than 27 rolls.
A: We can show something stronger; there exists an interval of rolls where each side has appeared a number of times which is a multiple of $3$.
For each $i=1,2,\dots,1000$, let $a_i$ be number of times that the first face has appeared in rolls numbered $1,2,\dots,i$. Same for $b_i,c_i,d_i,e_i,f_i$. Consider the $1000$ ordered six-tuples of values $T_i:=(a_i,b_i,\dots,f_i)$, where each coordinate is only recorded modulo $3$. There are $3^6=729$ possible six-tuples, and there are $1000$ rolls, so by the pigeonhole principle, there are two indices $i<j$ for which $T_i=T_j$. This implies that among rolls numbered $i+1,i+2,\dots,j$, each face appears a number of times which is a multiple of three.
