import java.io.*;

class Leitor 
{
	public static void main(String[] args) 
	{
		String linha;
		int tamanho;

		try
		{
			BufferedReader b = new  BufferedReader(new FileReader(args[0]));			

			while (b.ready())
			{
				linha = b.readLine();

				if	(linha != null ) 
					tamanho = linha.length();
				else
					tamanho = 0;

				System.out.println(tamanho + "  " + linha);
			}
		}
		catch (FileNotFoundException f)
		{
			System.out.println("Arquivo nao encontrado.");
			f.printStackTrace();
		}
		catch (IOException i)
		{
			i.printStackTrace();
		}

	}
}

