Using each of the ten digits exactly once, construct two five-digit numbers such that their difference is minimized. Determine this minimal difference.

Let's think step by step and output the final answer within \boxed{}.
user