using System.Collections.Generic;
public static List<string> funWithAnagrams(List<string> text) {
throw new ArgumentNullException(nameof(text));
var unique = new HashSet<string>();
for (int i = 0; i < text.Count; )
if (unique.Add(string.Concat(text[i].OrderBy(c => c))))
public static void Main() {
List<string> str = new() {
var text = funWithAnagrams(str);
Console.Write(string.Join(", ", text));