import java.text.*;
import javagently.*;
import java.util.*;
import java.io.*;

class TestDates {

  public static void main (String args []) throws IOException {
    new TestDates ();
  }

  TestDates() throws IOException {
    System.out.println("Type in a date as dd-mmm-yyyy");
    System.out.println();
    Stream in = new Stream(System.in);
    String s = in.readString();
    System.out.println("String is :"+s);
    DateFormat DF = DateFormat.getDateInstance();
    Date d = new Date();
    try {
      d = DF.parse(s);
      System.out.println("Date is :"+d);
    } catch (ParseException e) {
      System.out.println("Error in date " + s);
    }
  }
}
