from Crypto.PublicKey import RSA
from Crypto.Util.number import *
import gmpy2 
from gmpy import *

f = open("publickey.pem", "r")

key = RSA.importKey(f.read())

n = key.n
e = key.e

cipher = "0f01d27bfc4c93f023cffdf8cd8f43b0a574b7ba70484ff3b36d65d41a01397dc684da97a7b5be14bb56671b9edaaff9e57bfdf747e092d408962dcb9452b9667f9bb2a7e398cf2493e62e6f471ec675756b257245b21fabe646f1271acb5833161f584ac3fc3d71e255110ee2e57c2eb865"

cipher = bytes_to_long(cipher.decode("hex"))

flag = gmpy2.iroot(cipher, 3)
print(long_to_bytes(flag[0]))



