100 atcoder#ABC219B. [ABC219B] Maritozzo
[ABC219B] Maritozzo
Score : points
Problem Statement
You are given three strings consisting of lowercase English letters, and a string consisting of 1
, 2
, 3
.
Concatenate the three strings according to the characters in and print the resulting string. Formally, conform to the following instructions.
- For each integer such that , let the string be defined as follows:- , if the -th character of is
1
;- , if the -th character of is
2
; - , if the -th character of is
3
.
- , if the -th character of is
- Concatenate the strings in this order and print the resulting string.
Constraints
- , , and consist of lowercase English letters.
- consists of
1
,2
, and3
.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
mari
to
zzo
1321
marizzotomari
We have mari
, zzo
, to
, mari
. Concatenate these and print the resulting string: marizzotomari
.
abra
cad
abra
123
abracadabra
a
b
c
1
a