First In Last Out

Assign distinct hexadecimal digits to the letters in LIST + FILO = STACK so the addition holds, and print every solution in lexicographic order.

Medium4Brute forceBacktrackingMathImplementationNo attempts yetTime limit1sMemory limit32 MB

Problem

Assign one hexadecimal digit from 00 to ff to each letter so that the hexadecimal addition LIST+FILO=STACKLIST + FILO = STACK holds. Different letters must receive different digits, and the leading letters LL, FF, and SS cannot be zero.

Input

There is no input.

Output

Print every valid solution on its own line in lexicographic order. Write each solution in the form LIST+FILO=STACKLIST + FILO = STACK using hexadecimal digits, with aa through ff in lowercase. Lexicographic order follows 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f.

Hint

Only some solutions are shown to illustrate the output format. A correct program prints every solution that satisfies the conditions.