Example program to find the greatest value of a property