public long[] Solve(string text, long n, string[] patterns)
        {
            List <long> l = new List <long>();
            SuffixTrie  s = new SuffixTrie();

            foreach (var str in patterns)
            {
                s.AddString(str);
            }
            s.SetString(text);
            for (int i = 0; i < text.Length; i++)
            {
                if (s.Find(i))
                {
                    l.Add(i);
                }
            }
            if (!l.Any())
            {
                return new long[] { -1 }
            }
            ;
            return(l.ToArray());
        }
    }
        public string[] Solve(long n, string[] patterns)
        {
            SuffixTrie s = new SuffixTrie();

            foreach (var str in patterns)
            {
                s.AddString(str);
            }
            var res = s.Traversal();

            return(res.Split('\n'));
        }