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

public class BeerServer {
  public static void main(String args[]) throws Exception {
    ServerSocket ssock=new ServerSocket(1234);
    System.out.println("Listening");
    Socket sock=ssock.accept();
    ssock.close(); // no more connects

    PrintStream pstream=new PrintStream(
       sock.getOutputStream());
    for (int i=100;i>=0;i--) {
      pstream.println(i + " bottles of beer on the wall");
      }
    pstream.close();
    sock.close();
    }
  }
