LearnPy Hub
← Iterators & Generators problems
Easy

Walking Backwards

Read a word. Print the letters of reversed(word) joined by dashes, then print next(iter(word)).

Input

One word.

Output

Two lines.

Sample 1

Input
abc
Output
c-b-a
a

Sample 2

Input
Python
Output
n-o-h-t-y-P
P
solution.py
Output appears here
Walking Backwards · Python practice problem · LearnPy Hub