import java.util.Scanner;
class work1
{
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
System.out.println("请输入5句话:");
String[] names = new String[5];
for(int i=0;i<names.length;i++){
System.out.print("第"+(i+1)+"句:");
names[i]=input.next();
}
for(int i=names.length-1;i>=0;i--){
System.out.println(names[i]);
}
}
}