>>13800396First of all, this is called a lexicographic ordering. We say that a string XY<X'Y' if XY appears earlier in the sequence then X'Y'.
Now I think we can solve your problem in the following manner:
Sequentially assign a number {1, ... , k} for each of you k symbols - in this case there are k=7 symbols, namely A, B, C, D, E, F, G. Let f denote the function corresponding to this assignment of values, i.e. let f be given by
f(A) = 1,
f(B)=2, ...
etc.
Under the lexicographic ordering on symbols, we then have XY < X'Y'
iff
f(XY) < f(X'Y') under the standard ordering on the integers.
For example, we know that AB appears earlier in the list than AC because 12<13, and f(AB)=12, while f(AC)=13.
Now how does that help you answer your question? If you want to determine the position of XY, just count the number of 2 digit numerals that are less than the numeral f(XY). How many of these are there? I think there should be f(X)*(f(y)-1). Why? Because any string X'Y'<XY must satisfy both X' <= X (less than or equal to) and Y'<Y (strictly less than).
For example, given that f(DF) = 45, there should be f(D)*(f(F)-1)=4*4=16 string in the list that appear before DF.
If any of this is wrong, please forgive me, but I might have forgotten some things or made some typos, so be mindful of that.