{"raw_statement":[{"iden":"problem statement","content":"Given strings $S_1,S_2,S_3$ consisting of lowercase English letters, solve the alphametic $S_1+S_2=S_3$.\nFormally, determine whether there is a triple of **positive** integers $N_1, N_2, N_3$ satisfying all of the three conditions below, and find one such triple if it exists.  \nHere, $N'_1, N'_2, N'_3$ are strings representing $N_1, N_2, N_3$ (without leading zeros) in base ten, respectively.\n\n*   $N'_i$ and $S_i$ have the same number of characters.\n*   $N_1+N_2=N_3$.\n*   The $x$\\-th character of $S_i$ and the $y$\\-th character of $S_j$ is the same if and only if the $x$\\-th character of $N'_i$ and the $y$\\-th character of $N'_j$ are the same."},{"iden":"constraints","content":"*   Each of $S_1$, $S_2$, $S_3$ is a string of length between $1$ and $10$ (inclusive) consisting of lowercase English letters."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S_1$\n$S_2$\n$S_3$"},{"iden":"sample input 1","content":"a\nb\nc"},{"iden":"sample output 1","content":"1\n2\n3\n\nOutputs such as $(N_1, N_2, N_3) = (4,5,9)$ will also be accepted, but $(1,1,2)$ will not since it violates the third condition (both `a` and `b` correspond to `1`)."},{"iden":"sample input 2","content":"x\nx\ny"},{"iden":"sample output 2","content":"1\n1\n2\n\nOutputs such as $(N_1, N_2, N_3) = (3,3,6)$ will also be accepted, but $(1,2,3)$ will not since it violates the third condition (both $1$ and $2$ correspond to `x`)."},{"iden":"sample input 3","content":"p\nq\np"},{"iden":"sample output 3","content":"UNSOLVABLE"},{"iden":"sample input 4","content":"abcd\nefgh\nijkl"},{"iden":"sample output 4","content":"UNSOLVABLE"},{"iden":"sample input 5","content":"send\nmore\nmoney"},{"iden":"sample output 5","content":"9567\n1085\n10652"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}