3. Determine all four-digit numbers a whose digits are all different, given that the numbers 586Q16749432 and 3017 contain exactly two digits from the number $a$ such that these digits in the number $a$ do not occupy the same position as in the given numbers.
The numbers 586C and 9432 have eight different digits, so they do not contain the digits 1 and 7. Therefore, a contains the digits $0,3,4,6$ (from the numbers 3017 and 5860). 0 is not in the first, second, and fourth positions, so it must be in the third position. 4 is not in the second, third, and fourth positions, so it must be in the first position. 6 is not in the first, second, and third positions, so it must be in the fourth position. Therefore, the desired number is $a=4306$.