102840: [AtCoder]ABC284 A - Sequence of Strings

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

You are given $N$ strings $S_1,S_2,\ldots,S_N$ in this order.

Print $S_N,S_{N-1},\ldots,S_1$ in this order.

Constraints

  • $1\leq N \leq 10$
  • $N$ is an integer.
  • $S_i$ is a string of length between $1$ and $10$, inclusive, consisting of lowercase English letters, uppercase English letters, and digits.

Input

The input is given from Standard Input in the following format:

$N$
$S_1$
$S_2$
$\vdots$
$S_N$

Output

Print $N$ lines. The $i$-th $(1\leq i \leq N)$ line should contain $S_{N+1-i}$.


Sample Input 1

3
Takahashi
Aoki
Snuke

Sample Output 1

Snuke
Aoki
Takahashi

We have $N=3$, $S_1=$ Takahashi, $S_2=$ Aoki, and $S_3=$ Snuke.

Thus, you should print Snuke, Aoki, and Takahashi in this order.


Sample Input 2

4
2023
Year
New
Happy

Sample Output 2

Happy
New
Year
2023

The given strings may contain digits.

Input

题意翻译

给定 $N$ 个字符串,$S_1,S_2 ... S_n$。 将这 $N$ 个字符串反序输出(即 $S_n,S_{n-1} ... S_1$),中间以一个换行隔开。 数据保证 $ 1 \leq N \leq 10$。 translate by [ChrisWangZi](https://www.luogu.com.cn/user/637180)

Output

分数:100分

问题描述

你将依次得到$N$个字符串$S_1,S_2,\ldots,S_N$。

按照这个顺序打印$S_N,S_{N-1},\ldots,S_1$。

约束条件

  • $1\leq N \leq 10$
  • $N$是一个整数。
  • $S_i$是一个长度在$1$到$10$之间的字符串,由小写英文字母、大写英文字母和数字组成。

输入

输入通过标准输入给出以下格式:

$N$
$S_1$
$S_2$
$\vdots$
$S_N$

输出

打印$N$行。 第$i$行$(1\leq i \leq N)$应包含$S_{N+1-i}$。


样例输入1

3
Takahashi
Aoki
Snuke

样例输出1

Snuke
Aoki
Takahashi

我们有$N=3$,$S_1=$ Takahashi,$S_2=$ Aoki,且$S_3=$ Snuke

因此,你应该按照这个顺序打印SnukeAokiTakahashi


样例输入2

4
2023
Year
New
Happy

样例输出2

Happy
New
Year
2023

给定的字符串可能包含数字。

加入题单

算法标签: