French license plates Sandbox

French License Plates

French license plates come in a sequential order, following a specific pattern of numbers and letters : AB-012-CD

Challenge

Write a program or function that, for a given number, outputs the corresponding french license plate number. Your program should not handle any special case as specified in the linked page. It should be able to generate the full 26*26*1000*26*26 =&gt; 456 976 000 possible plates, or as far as your language can support.

The numbering system goes as follows:


AA-000-AA to AA-999-AA (numbers evolve first);
AA-000-AB to AA-999-AZ (then the last letter on the right);
AA-000-BA to AA-999-ZZ (then the first letter on the right);
AB-000-AA to AZ-999-ZZ (then the last letter on the left);
BA-000-AA to ZZ-999-ZZ (then the first letter on the left).


Input


The plate number's index as an integer


Output


The corresponding french license plate number


Additional information


Letters have to be uppercase
You can use both 0-based and 1-based indexing to generate the plates (meaning AA-000-AA can correspond to 0or 1, assuming all the other test cases use the same indexing.


This is code-golf, shortest answer in every language wins!

Test cases (0-based indexing)

          0 -&gt; AA-000-AA
          1 -&gt; AA-001-AA
        999 -&gt; AA-999-AA
       1000 -&gt; AA-000-AB
    675 999 -&gt; AA-999-ZZ
    676 000 -&gt; AB-000-AA
456 975 999 -&gt; ZZ-999-ZZ
Pure Bash (no external utils), 64


2 bytes saved thanks to @NahuelFouilleul




x={A..Z}
eval f=($x$x-%03d-$x$x)
printf ${f[$1/1000]} $[$1%1000]


Try it online! - takes about 10s to run over the 7 testcases.


Line #1 is a simple assignment of a string to a variable
Line #2 is a brace expansion to build an array of printf format strings, one for all 456,976 possible letter combinations, with the digits not yet specified.  The eval is required to ensure variable expansion (of x) occurs before brace expansion.
Line #3 indexes the array to get the appropriate format string and takes the digits portion as its parameter.