find the number of ways to replace all the -1s in the array with an integer in the range 1 to m such that the resulting array can be represented as a wave. since the answer can be large, compute it modulo (10^9) 7.