from hashlib import md5
from string import ascii_letters,digits,punctuation
from itertools import permutations
from time import time

strs=ascii_letters+digits+punctuation
def brute_md5(md5_value):
    if len(md5_value)!=32:
        print('不是有效的md5值')
        return
    for item in permutations(strs,5):
        item=''.join(item)
        if md5(item.encode()).hexdigest()==md5_value:
            print(item)
            return

md5_value = input()
start=time()
result = brute_md5(md5_value)
end=time()
if result:
    print('\n Success: '+md5_value+'==>'+result)
print('Time used:',end-start)