fixed greedy (same output)