public class Solution {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        //напишите тут ваш код
        ArrayList<String> list = new ArrayList<String>();
        while (true) {
            String s = reader.readLine();
            if (s.equals("end")) {
                break;
            }
            else {
                list.add(s);
            }
        }

        for (int i = 0; i < list.size(); i ++) {
            System.out.println(list.get(i));
        }
    }
}