~/algor $ cat problems/string-birinchi-va-oxirgi-belgi
First and last letter
Easy
1000 ms
128 MB
20%
A string $s$ of lowercase Latin letters is given. Print its first and last characters separated by a space. If the string has one character, it is printed twice.
Input
One line containing the string $s$.
Output
Two characters separated by a space on one line.
Note
$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters (a–z) only
Examples
Input #1
algoritm
Output #1
a m
Input #2
x
Output #2
x x