#PCBTAM0000002. Ghép hai chuỗi (Join Two Strings)
Ghép hai chuỗi (Join Two Strings)
Join Two Strings
Version: Phuoc Hung OJ Extended
Problem Statement
Given two text strings and , construct a new string by writing all of , inserting exactly one ordinary space (U+0020), and then writing all of .
Insert the separator even if either string is empty. Do not remove or modify any spaces already present in the input strings.
Input
The first line contains and the second line contains . Either line may be empty and may contain leading or trailing spaces.
Output
Print the concatenation of , one space, and on one line.
Subtasks
- Subtask 1 (100 points): characters.
Examples
Example 1
Input
Xin
chao
Output
Xin chao
Explanation. Concatenating Xin, one space, and chao gives Xin chao.
Example 2
Input
B
Output
B
Explanation. Since is empty, the inserted space remains before B.
Example 3
Input
A
Output
A
Explanation. Since is empty, the result has a trailing space after A; it must be preserved.