Solve a medium LeetCode-style coding problem.
Implement min_window(s, t) to return the shortest substring of s containing every character in t, including duplicate occurrences. Return an empty string if no such substring exists.
Input: two nonempty strings s and t. Output: the required substring, with any valid shortest result accepted when multiple answers exist.
def min_window(s, t):