class ExecExampleWithTerminalSize {

  public static void main(String[] args) throws InterruptedException {<FILL_FUNCTION_BODY>}

  private static ExecWatch newExecWatch(KubernetesClient client, String namespace, String podName, String columns,
      String lines) {
    return client.pods().inNamespace(namespace).withName(podName)
        .writingOutput(System.out)
        .writingError(System.err)
        .withTTY()
        .usingListener(new SimpleListener())
        .exec("env", "TERM=xterm", "COLUMNS=" + columns, "LINES=" + lines, "sh", "-c", "ls -la");
  }

  private static class SimpleListener implements ExecListener {

    @Override
    public void onOpen() {
      System.out.println("The shell will remain open for 10 seconds.");
    }

    @Override
    public void onFailure(Throwable t, Response failureResponse) {
      System.err.println("shell barfed");
    }

    @Override
    public void onClose(int code, String reason) {
      System.out.println("The shell will now close.");
    }
  }

}

    if (args.length < 1) {
      System.out.println("Usage: podName [namespace] [columns] [lines]\n" +
          "Use env variable COLUMNS & LINES to initialize terminal size.");
      return;
    }

    String podName = args[0];
    String namespace = "default";
    String columns = "80";
    String lines = "24";

    if (args.length > 1) {
      namespace = args[1];
    }
    if (args.length > 2) {
      columns = args[2];
    }
    if (args.length > 3) {
      lines = args[3];
    }

    try (
        KubernetesClient client = new KubernetesClientBuilder().build();
        ExecWatch exec = newExecWatch(client, namespace, podName, columns, lines);) {
      exec.exitCode().join();
    }
  
<no_super_class>