# What is the next item in this numerical sequence?

I found this on a test, and it's under "Numerical sequences". I can't figure it out. I tried using the numbers of the alphabet: 1, 2, 9, 12, 1, 2. I don't see a clear pattern.

A,B,I,L,A,B,?

This has been solved by the great Rick Rosner.

It doesn't go by the pattern ABIL ABIL ABIL...

$$Y$$
Assume that each element has an index (position) $$i$$. Now, the element at $$i$$ is $$i^{i-1}\text{ mod }26$$. For example,$$\text{}\\\\$$ $$1^0 \equiv 1 \text{ (mod 26}) = A,\\ 2^1 \equiv 2 \text{ (mod 26}) = B,\\ 3^2 \equiv 9 \text{ (mod 26}) = I,\\ 4^3 = 64 \equiv 12 \text{ (mod 26}) = L,\\ 5^4 = 625 \equiv 1 \text{ (mod 26}) = A,\\ 6^5 = 7776 \equiv 2 \text{ (mod 26})= B,\\ 7^6 = 117649 \equiv 25 \text{ (mod 26}) = Y$$