Азербайджан - подготовка. Март 18
Fibonacci sequence of strings is defined as follows:
s1 = b,
s2 = a,
sk-2 for k > 2. For example,
s3 = ab,
s4 = aba,
s5 = abaab and etc.
Given positive integers n, m, l. Print the substring of
sn which starts at position m and have the length l.
One line contains three space-separated positive integers n, m and l, where 1 ≤ n ≤ 40; 1 ≤ m ≤ length(
Sn), 1 ≤ l ≤ 1000.
Print the substring of
sn which starts at position m and have the length l (the length of the printed substring may be less if the length of the remainder of the string
sn, starting from position m, is less than l).
5 3 2
5 3 10