Problem

7 /13


Referencing symbols

Theory Click to read/hide

Referencing row indices
Each character of a string has its own number (called index), and indexing in the programming language Pascal starts from one. That is, the first character has index 1, the second has index 2, and so on.
String characters can be accessed by indexes, which are indicated in square brackets s[i].
 
Example 
String S H e l l o
Index S[1] S[2] S[3] S[4] S[5]

P.S. Many string methods in PascalABC.NET assume that strings are indexed from zero. We won't be using string methods that work with zero-based indexes for the time being. There are equivalent replacements for these with external functions that assume that rows are indexed from 1. 
 

Problem

The program receives two lines as input:
the first line specifies the word s;
in the second - three integers a, b, c (each number is in the range [1; length(s)]< /code>)

Print a new word on the screen, formed by the characters in the places a, b, c (in that order).
 
Examples
# Input Output
1 computer science
3 4 5
fore