Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/string-birinchi-va-oxirgi-belgi

First and last letter

Easy 1000 ms 128 MB 20%
Share

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.

Highlighting the first and the last characters of the string

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

Sign in to submit a solution

Signing up is free and takes a minute.