I\'m trying to check if the given relations are transitive and if not, add new pairs of relations to make it transitive. Example input:
aa ab ad be
Function sh