Extremely Simple Python Solution (Memoization + Recursion)
py\n        MOD = pow(10, 9) + 7\n        @lru_cache(None)\n        def dp(n, a, b, c, d, e, f):\n            if not n: return 1\n            count = 0\n       
```py\n        MOD = pow(10, 9) + 7\n        @lru_cache(None)\n        def dp(n, a, b, c, d, e, f):\n            if not n: return 1\n            count = 0\n            if a < nums[0]: \n                count += dp(n - 1, a + 1, 0, 0, 0, 0, 0)\n            if b < nums[1]:\n                count += dp(n - 1, 0, b + 1, 0, 0, 0, 0)\n            if c < nums[2]:\n                count += dp(n - 1, 0, 0, c + 1, 0, 0, 0)\n            if d < nums[3]:\n                count += dp(n - 1, 0, 0, 0, d + 1, 0, 0)\n            if e < nums[4]:\n                count += dp(n - 1, 0, 0, 0, 0, e + 1, 0)\n            if f < nums[5]:\n                count += dp(n - 1, 0, 0, 0, 0, 0, f + 1)\n            \n            return count\n        \n        return dp(n, 0, 0, 0, 0, 0, 0) % MOD\n\t\t```
[]