using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string start = "A-10A*E";
            string end = "B-15B*G";
            string s = start;
            while (s != end)
            {
                Console.WriteLine(s);
                s = NextStr(start, end, s);
            }
            Console.WriteLine(end);
        }
        static string NextStr(string start, string end, string preStr)
        {
            char[] t = preStr.ToCharArray();
            for (int i = end.Length - 1; i >= 0; i--)
            {
                if (t[i] + 1 <= end[i])
                {
                    t[i]++;
                    break;
                }
                else
                {
                    t[i] = start[i];
                }
            }
            return new string(t);
        }
    }
}A-10A*E
A-10A*F
A-10A*G
A-10B*E
A-10B*F
A-10B*G
A-11A*E
A-11A*F
A-11A*G
A-11B*E
A-11B*F
A-11B*G
A-12A*E
A-12A*F
A-12A*G
A-12B*E
A-12B*F
A-12B*G
A-13A*E
A-13A*F
A-13A*G
A-13B*E
A-13B*F
A-13B*G
A-14A*E
A-14A*F
A-14A*G
A-14B*E
A-14B*F
A-14B*G
A-15A*E
A-15A*F
A-15A*G
A-15B*E
A-15B*F
A-15B*G
B-10A*E
B-10A*F
B-10A*G
B-10B*E
B-10B*F
B-10B*G
B-11A*E
B-11A*F
B-11A*G
B-11B*E
B-11B*F
B-11B*G
B-12A*E
B-12A*F
B-12A*G
B-12B*E
B-12B*F
B-12B*G
B-13A*E
B-13A*F
B-13A*G
B-13B*E
B-13B*F
B-13B*G
B-14A*E
B-14A*F
B-14A*G
B-14B*E
B-14B*F
B-14B*G
B-15A*E
B-15A*F
B-15A*G
B-15B*E
B-15B*F
B-15B*G
Press any key to continue . . .