#include <iostream>
#include <map>
#include <functional>
#include <tuple>
using namespace std;
using uint = unsigned int;
using cstr = const char *;

const map<uint, cstr, greater<>> roman_numbers
{
    { 1000,	"M"  },
    { 900,  "CM" },
    { 500,  "D"  },
    { 400,  "CD" },
    { 100,  "C"  },
    { 90,   "XC" },
    { 50,   "L"  },
    { 40,   "XL" },
    { 10,   "X"  },
    { 9,    "IX" },
    { 5,    "V"  },
    { 4,    "IV" },
    { 1,    "I"  },
};

string dec_to_roman(uint num)
{
	string result;
	uint divisor, digits;
	cstr roman;
	for (auto& dr_pair : roman_numbers) {
		tie(divisor, roman) = dr_pair;
		digits = num / divisor;
		num -= digits * divisor;
		for (uint j = 0; j < digits; ++j)
			result += roman;
	}
	return result;
}

int main() {
	for (uint i = 0; i < 101; ++i)
		cout << dec_to_roman(i) << endl;
}