Problem

1 /8


slices

Theory Click to read/hide

In Pascal, you can select part of a string (substring). For this, the copy operation is used.
The general form of the operation is as follows:

s1 := copy(s, index, count);
This command takes a slice from the string s, starting at the character at index index of length count.
For example,
s1 := copy(s, 3, 5);
If index is greater than the length of the string, then an empty string is returned. If count characters, starting at index, are longer than the length of the string, then the string s is returned, starting at index and ending.

And here's how easy it is to reverse a string:
s := '0123456789';
s1 := reverseString(s); // s1 = '0123'

Problem

When solving a problem, use the copy() method

Input

Given a string.

Imprint

First print the third character of this string.

In the second line print the penultimate character of this line.

In the third line print the first five characters of this line.

On the fourth line, print the entire line, except for the last two characters.

On the fifth line, print all characters with even indices (assuming that indexing starts from 0, so the characters are printed starting from the first).

On the sixth line print all characters with odd indices, i.e. starting from the second character of the line.

On the seventh line print all characters in reverse order.

In the eighth line print all the characters of the line one by one in reverse order, starting from the last one.

On the ninth line print the length of the given string.


Examples
# Input Output
1 Abrakadabra r
r
Abrak
Abrakadab
Arkdba
baar
arbadakarbA
abdkrA
11