Class that represents a pair
class Priority { String s ; int count ; } class PQ implements Comparator < Priority > { public int compare ( Priority a , Priority b ) { if ( a . count > b . count ) return 1 ; else if ( a . count < b . count ) return - 1 ; return 0 ; } } class GFG {