Hello World!

Assign distinct digits to the seven letters in hello + world so the sum equals N, then print the smallest hello in a column format.

Medium4Brute forceMathImplementationNo attempts yetTime limit1sMemory limit32 MB

Problem

You are given a positive integer NN. Assign one digit to each of the seven letters d, e, h, l, o, r, w so that the addition below holds.

hello+world=N\text{hello} + \text{world} = N

Here hello is the five digit number whose digits from the most significant one are h, e, l, l, o, and world is the five digit number whose digits from the most significant one are w, o, r, l, d. The digits assigned to the seven letters are pairwise different, and the leading digits h and w cannot be 0.

Input

The first line contains a positive integer NN. NN fits in the range of a 32 bit signed integer.

Output

If no assignment satisfies the equation, print No Answer.

Otherwise take the assignment whose hello is smallest and print four lines. Let LL be the number of digits of NN and let W=L+2W = L + 2.

  1. On the first line print hello right aligned in a field of width WW.
  2. On the second line print +, then world right aligned in a field of width W1W - 1.
  3. On the third line print the character - exactly WW times.
  4. On the fourth line print NN right aligned in a field of width WW.

Right aligned means the number is padded on the left with spaces until it reaches the given width.