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


public class uudecode{
     /*==========================================================================*/
    
    private byte[] input;							/*1*/
    private byte[] output;							/*2*/
    private int ooffset;							/*3*/
    private int offset;								/*4*/
    public String name;								/*5*/

    uudecode(String filename) throws IOException{				/*6*/
	FileInputStream fis = new FileInputStream(filename);			/*7*/
	int bytesize;								/*8*/
	input = new byte[4000000];						/*9*/
	bytesize = fis.read(input, 0, 4000000);					/*10*/
	output = new byte[bytesize];						/*11*/
    }	

   
    private void run() {							/*12*/
	offset+=10;								/*13*/
	get_name();								/*14*/
	decode();								/*15*/
	return;
    }

    private int decode() {							/*16*/
	while (input[offset] != 32) {						/*17*/
	    int encodedoctets;							/*18*/
	    encodedoctets = decode_char(input[offset]);				/*19*/
	    for (++offset; encodedoctets > 0; offset += 4, encodedoctets -= 3) { /*20*/
		int ch;								/*21*/
		if (encodedoctets >= 3) {					/*22*/
		    ch = decode_char (input[offset]) << 2 | 			/*23*/
			decode_char (input[offset+1]) >> 4;			/*24*/
		    output[ooffset++] = (byte) ch;				/*25*/
		    ch = decode_char (input[offset+1]) << 4 | 			/*26*/
			decode_char (input[offset+2]) >> 2;			/*27*/
		    output[ooffset++] = (byte) ch;				/*28*/
		    ch = decode_char (input[offset+2]) << 6 | 			/*29*/
			decode_char (input[offset+3]);				/*30*/
		    output[ooffset++] = (byte) ch;				/*31*/
		} else {
		    if (encodedoctets >= 1) {					/*32*/
			ch = decode_char (input[offset]) << 2 | 		/*33*/
			    decode_char (input[offset+1]) >> 4;			/*34*/
			output[ooffset++] = (byte) ch;				/*35*/
		    }
		    if (encodedoctets >= 2) {					/*36*/
			ch = decode_char (input[offset+1]) << 4 | 		/*37*/
			    decode_char (input[offset+2]) >> 2;			/*38*/
			output[ooffset++] = (byte) ch;				/*39*/
		    }
		}
	    }
	    skip_to_newline();							/*40*/
	}
	skip_to_newline();							/*41*/
	if (input[offset]=='e' && input[offset+1]=='n'				/*42*/
	    && input[offset+2]=='d') {						/*43*/
	    return 0;								/*44*/
	}
	return -1;								/*45*/
    } 

    private void skip_to_newline() {						/*46*/
	while(input[offset] != 10)						/*47*/
	    {offset++;}								/*48*/
	offset++; 								/*49*/
	return;
    }
    
    private int decode_char(int in) {						/*50*/
	return ((in) - ' ') & 63;						/*51*/
    }

    private void get_name() {							/*52*/
	int start=offset;							/*53*/
	while(input[offset] != 32) {						/*54*/
	    offset++;								/*55*/
	}
	name = new String(input, start, offset-start);				/*56*/
	offset+=2;								/*57*/
	return;
    }

   /*==========================================================================*/
    private void write_file(String filename) throws IOException {
	FileOutputStream fos = new FileOutputStream(filename+".java");
	fos.write(output,0,ooffset);
    }
    
    private void reset() {
	ooffset = 0;
	offset = 0;
	return;
    }

    public static void main(String[] args) {
	uudecode bin;
	long time;
	try {
	    bin = new uudecode(args[0]);
	}
	catch (IOException e) {return;}
	long start = System.currentTimeMillis();
	for(int i=0; i<100; i+=1){
	    bin.reset();
	    bin.run();
	}
	long end = System.currentTimeMillis();
	time = end-start;
	System.out.print("" + (float)time/1000.0);
	try {
	    bin.write_file(bin.name);
	}
	catch (IOException e) {return;}
    }
}

