P1952 Addition on Mars

Description

Recently, Huanhuan read a book about Mars and got confused by an addition operation. Since her arithmetic skills are limited, she asks you for help. As an excellent programmer, you certainly won’t refuse.

Input Format

The first line contains the base of the operation $N\left(2 \le N \le 36\right)$. The next two lines contain the characters to be added. Each string has a length of at most $200$ digits and represents a base-$N$ number. The digits include $0$ to $9$ and a to z (representing $10$ to $35$).

Output Format

Output their sum in base $N$.

Explanation/Hint

Translated by ChatGPT 5