print lexicographically