import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class Main {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("memphis.cs.utah.edu", 5522);
        System.out.println("To " + socket.getInetAddress().getHostAddress());
        System.out.println("As " + socket.getLocalAddress().getHostAddress());
        socket.close();
    }
}
