from socket import socket

client = socket()
client.connect(('127.0.0.1', 9999))
phrase = input()

while phrase != "FIN":
    phrase += "\n"
    client.send(phrase.encode())
    phrase = input()

client.close()
