import java.io.*;
public class jl
{
public static void main(String args[]) throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw=new BufferedWriter(new FileWriter("line.txt"));
String s;
while(true)
{
System.out.print("输入一个字符串:");
System.out.flush();
s=br.readLine();
if(s.length()==0) break;
bw.write(s);
bw.newLine();
}
bw.close();
}
}