A little known (but actually real) number system are the Castilian numerals. They were an odd mix of a digital and positional counting system used in Spain in the late middle ages. There are certain qualities about them, however, that make them not entirely straight forward to generate when you have lots of them in a group, in particular the fact they would be aligned by thousands places. Your challenge will be to print a vertical list of numbers, correctly spaced.
Description of the Numerals
A Castilian numeral is, in effect, a Roman numeral, but only uses 1-999, uses additives for 4 (IIIJ), 9 (VIIIJ), and 900 (DCCCC), and subtractives for 90 (XC) and 400 (CD). Both methods were commonly used for 40 (XL, XXXX). Additionally, final Is were written as Js, such that the sequence 1-6 goes J, IJ, IIJ, IIIJ, V, VJ. (This means standard Roman numeral generators will likely not be much help.) They were generally written lowercase, but for this challenge we'll use all uppercase.
For values under between 1-999, the fact that the letters indicated numerals was made clear by the presence of a symbol that looks like a U. Generally the numerals themselves were right aligned:
1 U J
2 U IJ
999 U DCCCXCVIIIJ
For values between 1000-999999, everything we would place to the left of the comma would be rendered as if it were its own independent 3-digit number and romanized, and the reminder placed to the right, such that
1,000 J U
1,001 J U J
21,030 XXJ U XXX
500,444 D U CDXXXXIIIJ
For values 1,000,000-999,999,999, an additional separator was used, Qto, but for our purposes, we'll just use Q. It would only be used if the number was over 1,000,000, unlike the U that always separated it.
1,000,000 J Q U
1,000,001 J Q U J
1,001,000 J Q J U
1,001,001 J Q J U J
123,456,789 CXXIIJ Q CDLVJ U DCCLXXXVIIIJ
As should be noticed, within each grouping of three (arabic) digits, everything is right aligned, with the thousands/million separators all in alignment. Because 0 didn't exist, it would just be left blank.
A sequence of integers in whatever format you feel gives you the best advantage (a list, an array, a series, etc). You may assume that the integers are between 1 and 999,999,999.
A printed list of Castilian numerals, properly aligned on different lines. Note the restrictions on 4/9: mandatory additives are 4,9,900; mandatory subtractives are 90 and 400; 40 is valid either way. The numerals for 1-999 should be right aligned, with a single space on either side of Q or U (there may be padding spaces, but the single longest numeral in each grouping will have the single space). Newlines may be whatever is native to your system/language.
This is code golf. Fewest bytes wins. Standard loopholes forbidden.
Comments/observations are given after
# and not part of the output.
U IIJ # one space between U and I
J U # trailing space not required
V U DCLXXVIIJ # single space between U and the longest numeral
CXJ Q CXJ U CXJ # Q only appears if >= 10^7
XIJ U CCCXXXXV # also valid CCCXLV
VJ Q DCCLXXXIX U XIJ # single space between Q and the longest numeral