Master Number is a game in which one person comes up with a four-digit number (called “the master number”) and another person tries to guess it. Repeated digits in the number are not allowed. Each time the second player guesses a number, the first person grades how good the guess is, writing one X for each correct digit in the correct place, and one O for each correct digit in the wrong place. For instance, if the master number is “2468” and your opponent guesses “1248”, you would score it “XOO”. Note that the location of X’s and O’s in the grade may not correspond with the location of digits in the number they are referring to.

A recent game of Master Number began as follows (the first number in parentheses shows the order of guesses):

(1) 4321 XO
(2) 5678 O
(3) 7140 XO
(4) 6914 X

What is the value of the master number?

(Prove that this is a unique solution.)