Find the greatest five-digit number A in which the fourth digit is greater than the fifth; the third greater than the sum of the fourth and fifth; the second greater than the sum of the third, fourth and fifth; and the first greater than the sum of the other digits.

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