##### Classify The Roman Numerals

This problem is from ICPC competition that one of my followers participated (and asked for explanation) on October 22, 2023.
Problem statement Your task is to determine the number of symmetry axis of the given Roman Numeral.
The following table from Wikipedia displays how the Roman Numerals are written:
Individual decimal places Thousands Hundreds Tens Units 1 M C X I 2 MM CC XX II 3 MMM CCC XXX III 4 CD XL IV 5 D L V 6 DC LX VI 7 DCC LXX VII 8 DCCC LXXX VIII 9 CM XC IX Note that: