import java.util.*;
import java.io.*;
import java.lang.*;

public final class ReadFile
 { private static FileReader fr;
 
   public ReadFile(String F) throws IOException
     {fr= new FileReader(F);};
  
  
  public static String readWord()
   { try { char c='a';
      int b = fr.read();
      if(b!=-1) c = (char) b;
      while(b!=-1 && !Character.isLetter(c))
         {  b = fr.read();
           if(b!=-1) c = (char) b;};

      StringBuffer buf = new StringBuffer();

      while(b!=-1 && Character.isLetter(c)) {
        buf.append(c); b = fr.read();
           if(b!=-1) c = (char) b;};
      if(buf.length()==0) return "ENDOFFILE";
      return buf.toString();}
    catch( IOException e )
            {  System.out.println( e ); return null; }
  };


 public static void main( String [ ] args ) throws IOException
    {  ReadFile r = new ReadFile(args[0]);
       String s = r. readWord();
       while(s!="ENDOFFILE")
        { System.out.println(s);s = r. readWord();};
       
    
   
   
    }

}

