Module: (Python) Workshop - 5. Handling strings. "A little about Ancient Rome and Julius Caesar"


Problem

3 /6


Education in ancient Rome

Problem

Education in Ancient Rome was important in the life of the Romans. The rich people of Ancient Rome believed in the necessity and importance of education. The poor inhabitants of Rome did not have the opportunity to get an education, but many learned to read and write on their own.

There were two types of schools in ancient Rome. The first type – these are schools for young children up to the age of 11-12, where they learned to write, read and learned the basics of mathematics. Children of such schools could easily solve various mathematical problems, including continuing the following sequence of rows:

1

11

21

1211

111221

312211

13112221

Try and solve this problem. Think about what row will be next.
Write a program to solve the problem.

Input
The input is two space-separated integers: (\(0 <= x <=100\)) - the first member sequences and (\(1<=n<=25\)).

Imprint 
Print the n-th row of the x-th sequence.

 
Examples
# Input Output
1 1 4 1211