import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;
class Server {
public static void main(String args[]) throws Exception {
ServerSocket ss = new ServerSocket(7788);
Socket s = ss.accept();
byte[] t = new byte[100];
System.in.read(t);
OutputStream os = s.getOutputStream();
os.write(t);
}
}
import java.net.*;
import java.io.*;
class Client{
public static void main(String args[]) throws Exception{
Socket s=new Socket("192.168.1.241",7788);
InputStream is=s.getInputStream();
byte[] buffer=new byte[100];
is.read(buffer);
System.out.println(new String(buffer));
}
}