import java.util.*;

public class key_letter{

  public static String dateFormat(){

    GregorianCalendar gc = new GregorianCalendar();
    int m = gc.get(Calendar.MONTH);
    String output="";
    if(m==0) output += "January";
    else if(m==1) output += "February";
    else if(m==2) output += "March";
    else if(m==3) output += "April";
    else if(m==4) output += "May";
    else if(m==5) output += "June";
    else if(m==6) output += "July";
    else if(m==7) output += "August";
    else if(m==8) output += "September";
    else if(m==9) output += "October";
    else if(m==10) output += "November";
    else output += "December";
    output += " " + gc.get(Calendar.DAY_OF_MONTH)+", ";
    output += gc.get(Calendar.YEAR);
    return output;
  }

  public static String line_separate(String s){
    StringBuffer sb = new StringBuffer(s);
    int cnt = 0;
    boolean sub = false;
    for(int i=0; i<sb.length(); i++){
      cnt++;
      if(cnt>80) sub=true;
      if(sub == true && sb.charAt(i) == ' '){
        sb.setCharAt(i,'\n');
        cnt=0;
        sub=false;
      }
    }
    return sb.toString();
  }
        
  public static void main(String[] args){
    if(args.length<3){
      System.out.println("USEAGE: java key_letter first last wpm");
      System.exit(0);
    }
    String first = args[0];
    String last = args[1];
    String wpm = args[2];
    String pre = "\n\n\n\n\n\n\n\n\n\n" +
     dateFormat() +
    "\n\nTo Whom It May Concern:\n";
     System.out.println(pre);
     String report = first + " " + last + " has successfully completed " +
     "the ROP computer keyboarding program at Trona High " + 
    "School. " + first + " " + last + " typed at a rate of " + wpm + " wpm" +
    " on a five minute timed typing test. This score was" +
    " adjusted for accuracy. Verification of the information presented here" +
    " may be obtained by contacting Trona High School at" +
     " (760) 372-2865.";
    String post = "\n\nSincerely,\n\n\nRandel McGirr\nROP Computer Instructor";
    System.out.println( line_separate(report) );
    System.out.println(post);
  }
}