Convert integers (1–3999) to Roman numerals and back, with validation that rejects malformed numerals.
MMXXIV