package com.javarush.task.task07.task0722;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Solution {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        //напишите тут ваш код
        ArrayList<String> list = new ArrayList<>();
        boolean proverka = true;
        while (true) {
            String str = reader.readLine();
            String end = "end";
            if (str.equals("end")) {
                break;
            } else {
                list.add(reader.readLine());
            }
        }
        for (String ss : list){
            System.out.println(ss);
        }
        //напишите тут ваш код
    }
}