When in Rome...

No attempts yetTime limit1sMemory limit128 MB

Problem

If the Roman Empire had never fallen, Rome would surely have discovered electricity and used electronic calculators. But the Romans wrote in Roman numerals! Your task is to build a simple Roman calculator that reads two Roman numerals and prints their sum as a Roman numeral.

You may assume that no number greater than 1000 appears in the input. However, if the sum is greater than 1000 it cannot be represented, so instead of a Roman numeral you must print the message CONCORDIA CUM VERITATE (In Harmony with Truth).

Input

The first line contains an integer, the number of test cases, followed by that many test cases. Each test case is a single line holding two Roman numerals joined by a +, with an = at the end of the line. There are no separating spaces.

Output

For each test case, copy the input line and append, after the =, the Roman numeral that represents the sum. Outputs for different test cases are separated by a single blank line.

Hint

Roman Research

The Roman numerals used by the Romans evolved over many years, so there are some variations in how they are written. We will use the following definitions:

  1. The following symbols are used: I for 1, V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1000.
  2. Numbers are formed by writing the symbols from rule 1 left to right as a sum, each time using the symbol for the largest possible value. The symbols M, C, X, or I may be used at most three times in succession. Only if this rule would be violated may you use the following rule:
    • When a single I immediately precedes a V or X, it is subtracted. When a single X immediately precedes an L or C, it is subtracted. When a single C immediately precedes a D or M, it is subtracted.

For example: II = 2; IX = 9; CXIII = 113; LIV = 54; XXXVIII = 38; XCIX = 99.