I made these two lists static however still TLE

```
class Solution(object):
def numSquares(self, n):
"""
:type n: int
:rtype: int
"""
self.dp = [i for i in range(n+1)]
self.squares = [i*i for i in range(1, int(n**0.5) + 1)]
for i in range(1, n+1):
for sq in self.squares:
if i - sq < 0:
break
self.dp[i] = min(self.dp[i], self.dp[i - sq] + 1)
return self.dp[-1]
```