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

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	}

	private static void doMain(int inCnt, String[] se) {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	}

	private static void doMain(int inCnt, String[] se) {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	} main {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	} BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); stdIn new BufferedReader(new InputStreamReader(System.in)) String s; s int inCnt = 0; inCnt 0 while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		} (s = stdIn.readLine()) != null (s = stdIn.readLine()) s stdIn.readLine() stdIn.readLine stdIn null {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		} inCnt++ inCnt if (inCnt % 2 == 1)
				continue; inCnt % 2 == 1 inCnt % 2 inCnt 2 1 continue; String[] se = s.split(" "); se s.split(" ") s.split s " " doMain(inCnt, se) doMain inCnt se System.exit(0) System.exit System 0 String[] args args private static void doMain(int inCnt, String[] se) {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	} doMain {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	} System.out.print(se[se.length - 1]) System.out.print System.out System System.out se[se.length - 1] se se.length - 1 se.length se se.length 1 for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		} int i = se.length - 2; int i = se.length - 2; i se.length - 2 se.length se se.length 2 i >= 0 i 0 i-- i-- i {
			System.out.print(" " + se[i]);
		} {
			System.out.print(" " + se[i]);
		} System.out.print(" " + se[i]) System.out.print System.out System System.out " " + se[i] " " se[i] se i System.out.println("") System.out.println System.out System System.out "" int inCnt inCnt String[] se se public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	}

	private static void doMain(int inCnt, String[] se) {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	}
} public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	}

	private static void doMain(int inCnt, String[] se) {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		int inCnt = 0;
		while ((s = stdIn.readLine()) != null) {
			inCnt++;
			if (inCnt % 2 == 1)
				continue;
			String[] se = s.split(" ");
			// int e = Integer.valueOf(se[0]);
			doMain(inCnt, se);
		}
		System.exit(0);
	}

	private static void doMain(int inCnt, String[] se) {
		System.out.print(se[se.length - 1]);
		for (int i = se.length - 2; i >= 0; i--) {
			System.out.print(" " + se[i]);
		}
		System.out.println("");

	}
}