#288. lastTwo

lastTwo

Background

Description

Given a string of any length, return a new string where the last 2 chars, if present, are swapped, so "coding" yields "codign".

Format

Input

Output

Samples

coding
"codign"
cat
"cta"
ab
"ba"

Limitation

1s, 1024KiB for each test case.