Take a look at the array: 4, 5, 2, 25. For the first element '4', the next greater element is '5'. For '5', there is no greater element that follows, so we print '-1'. For '2', the next greater element is '25'. Lastly, for '25', there is no subsequent greater element, so we print '-1'. Thus, the output will be: 5, -1, 25, -1.