Lexicographically order triples in output.