public class Solution {
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    public static void main(String[] args) throws Exception {
        //напишите тут ваш код

        String[] list = new String[10];
        for (int i = 0; i < 8; i++) {
            list[i] = reader.readLine();
        }

        for (int i = 0; i < list.length; i++) {
            System.out.println(list[list.length-i]);
        }

    }
}