7.lastNRevert

Write a function named lastNRevert that receives 2 parameters:

  • a string named text
  • a number - n

and returns the last n characters of text but in reverse order.

Example 1

Input

text

=

n

=

Output

Explanation

Last 4 characters are irts and their reversed order is stri.