// package pic20b;

import java.io.*;
import java.net.*;

public class Client0 {
    public static void main(String[] args) throws IOException {

	String host = "localhost";
	final int port = 4444;
	Socket sock = new Socket(host, port); 

	String query;
	String reply;

	PrintStream out = new PrintStream(sock.getOutputStream());
	BufferedReader in = new BufferedReader(
		new InputStreamReader(sock.getInputStream()));
	
	reply = in.readLine();
	System.out.println("Got from server: " + reply);
	out.println("Good, thank you!");
	out.flush();

	sock.close();
    }
}
