Variable sep and end
Write a program that reads 5 values. The first three values represent the text that needs to be printed. The 4th one shows how those values should be separated. The 5th one shows what should be at the end of the printed line.
Examples:
Input | Output |
AA
BB
CC
--
EE | AA--BB--CCEE |
Hey
there
!
.
ABCDE | Hey.there.!ABCDE |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB