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>();

        String s = null;
        while(true){
           s = reader.readLine();
           if (!s.equals("end")) list.add(s);
           else break;
        }

        for (int i =0; i<= list.size(); i++){
            System.out.println(list.get(i));
        }
        //напишите тут ваш код
    }
}