```
class Solution(object):
def minWindow(self, s, t):
table, match = {ch: t.count(ch) for ch in t}, len(t)
ans, minlen = '', len(s)
i, j = 0, 0
while j < len(s):
if s[j] in table:
table[s[j]] -= 1
if table[s[j]] >= 0:
match -= 1
while match == 0:
if s[i] in table:
table[s[i]] += 1
if table[s[i]] > 0:
match += 1
if j-i+1 <= minlen:
minlen, ans = j-i+1, s[i:j+1]
i += 1
j += 1
return ans
```