Write a basic penman compare function