import java.io.*;
import java.util.Properties;
import java.net.*;


public class t
  {
  static public void main(String args[]) throws Exception
    {
    Socket sock = new Socket("127.0.0.1",7542);
    PrintWriter pw=new PrintWriter(sock.getOutputStream());
    InputStream istream = sock.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(istream));
    String response;
    pw.print("S\n");
    pw.flush();
    response=br.readLine();
    if (response==null) response="Connection terminated";
    System.out.println(response);
    br.close();

    }
 }

