#!/usr/bin/env python3
from Crypto.Util.number import *

p = 0xf57c2c41811e6ef2ca843ffb3359977492f008736e5a3bf6c68e0337b5b93068a74ae01ece215c3c600000000000000000000000000000000000000000000000
n = 113954847378441551522493500984968465847633018880980771590278625504187861167681900872012944653475160211701661736300260194529508005923878166463824278227650138659888808556964271203295384802830741010509561888483441625833400734813257304376142148262455145898253949196509180159943843746225418174830196930437005987137
c = 110960995509593753586414445058090056192022711249034261327970072972237842358984979109482036607371525366794507213368401938143980296502371403082253168041199129918895635161476566764483118093417793289228317962233576518323809551513969693053116919429488737916057885903771772385273439771270145440651596683373514111754

P.<x> = PolynomialRing(Zmod(n))
f = p + x

roots = f.small_roots(beta = 0.5)
if roots:
    p = int(p + roots[0])
    q = n // p
    e = 65537
    d = inverse(e, (p - 1) * (q - 1))
    m = pow(c, d, n)
    print(long_to_bytes(m))
