The median of 6 numbers is the average of the two central numbers in the ordered set.
If the mean is 140 then the sum of the 6 numbers=6×140=840.
For example, the middle two numbers could be 135 and 145.
Let's pick a number less than 135. Let's pick 110. Now pick a number bigger than 145, say, 160.
So now we have 4 numbers: 110, 135, 145, 160. Add these together and we get 550.
840-550=290. The remaining two numbers must add up to 290. If we choose a number less than 110 as one number, say, 100, then the remaining number must be 290-100=190.
The set is 100, 110, 135, 145, 160, 190.
Many sets of numbers could be produced arbitrarily.