5033: P4432 [COCI2017-2018#2] ​​ZigZag(普及-)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Input

Output

Sample Input Copy

4 5
zagreb
split
zadar
sisak
z
s
s
z
z

Sample Output Copy

zadar
sisak
split
zagreb
zadar

HINT