# client TCP

from socket import socket

serveur = socket()
serveur.connect( ('127.0.0.1', 9999) )

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