Problem: Berland, 2016. The exchange rate of currency you all know against the burle has increased so much that to simplify the calculations, its fractional part was neglected and the exchange rate is now assumed to be an integer.

Reliable sources have informed the financier Anton of some information about the exchange rate of currency you all know against the burle for tomorrow. Now Anton knows that tomorrow the exchange rate will be an even number, which can be obtained from the present rate by swapping exactly two distinct digits in it. Of all the possible values that meet these conditions, the exchange rate for tomorrow will be the maximum possible. It is guaranteed that today the exchange rate is an odd positive integer n. Help Anton to determine the exchange rate of currency you all know for tomorrow!

Input

The first line contains an odd positive integer n — the exchange rate of currency you all know for today. The length of number n's representation is within range from 2 to 105, inclusive. The representation of n doesn't contain any leading zeroes.

Output

If the information about tomorrow's exchange rate is inconsistent, that is, there is no integer that meets the condition, print  - 1.

Otherwise, print the exchange rate of currency you all know against the burle for tomorrow. This should be the maximum possible number of those that are even and that are obtained from today's exchange rate by swapping exactly two digits. Exchange rate representation should not contain leading zeroes.

Examples

Input

527


Output

572


Input

4573


Output

3574


Input

1357997531


Output

-1

Solution (in PYTHON3):

Solution:
import sys
import io
import os

total = 0
failed = 0
def debug(*args):
    if('LOCALTEST' in os.environ):
        print(*args, file=sys.stderr)
def run(test,res):
    x = io.StringIO()
    with io.StringIO(test) as sys.stdin:
        with x as sys.stdout:
            work()
            z = x.getvalue().strip()
    sys.stdout = sys.__stdout__
    print("Passed?", z == res)
    print("Expected: ", res)
    print("Actual  : ", z)
    global total, failed
    total  += 1
    failed += 1 if (z != res) else 0

def work():
    s = input()
    n = len(s)

    a = set()
    for i in range(n - 1):
        if s[i] not in {'1', '3', '5', '7', '9'}:
            a.add(s[i])
    if len(a) == 0:
        print(-1)
        return
    z = list(filter(lambda x: x<s[n-1], a))
    if len(z) > 0:
        for i in range(n - 1):
            if s[i] in z:
                debug(s[0:i] + s[n-1] + s[i + 1:-1] + s[i])
                print(s[0:i] + s[n-1] + s[i + 1:-1] + s[i])
                return
    for i in range(n - 2, -1, -1):
        if s[i] in a:
            print(s[0:i] + s[n-1] + s[i + 1:-1] + s[i])
            return

def test():
    run("""527""", """572""")
    run("""4573""", """3574""")
    run("""45673""", """45376""")
    run("""65479""", """95476""")
    run("""165479""", """195476""")
    run("""385246627843978362170157540643675855323710353773677940411475196990509715752529160843392455573495010188243882382558472922204112350361246467416768459478030209854538107582510626063704160813094926075632868146563064819802533296712142335569927258520979994961865096239723316828287794398744124091180818727394089596668051860979159984286698041131600683449371516107143467478369268579340478734931842549019002584431211465609785063593300180811245235806427313597226897763366561773583469101869801696778514237679372806611094131""",
        """385246627843978362171157540643675855323710353773677940411475196990509715752529160843392455573495010188243882382558472922204112350361246467416768459478030209854538107582510626063704160813094926075632868146563064819802533296712142335569927258520979994961865096239723316828287794398744124091180818727394089596668051860979159984286698041131600683449371516107143467478369268579340478734931842549019002584431211465609785063593300180811245235806427313597226897763366561773583469101869801696778514237679372806611094130""")
    run("""1357997531""", """-1""")

if('LOCALTEST' in os.environ):
    test()
    print("\n Result: %s (%d total, %d failed)" % ("FAILED" if (failed>0) else "PASSED", total, failed))
else:
    work()