John wrote a $$4$$-digit number on a piece of paper and asked Peter to guess it.  Peter asked: "Is the number $$1703$$?"  John replied: "Two of the digits are correct. The positions of those digits are also correct."  Peter asked again: "Is the number $$2745$$?"  John replied: "Two of the digits are correct. The positions of those digits are all Wrong."  Peter asked again: "Is the number $$3541$$?"  John said: "All the digits are correct. The positions of those digits are all wrong."  Given all the digits in that $$4$$-digit number are all different, what is the number written by John? 
Overseas Competition->Knowledge Point->Combinatorics->Logical Reasoning