Competitions
Lesson 8. October 22 - 28. Recursive functions. Two dimentional arrays.
Print Matrix
Given n * n matrix - let's call it [1..n] * [1..n] array. For given values r and c print the [1..r] * [1..c] array (r rows and c columns of the given array).
Input
First line contains number n (1 ≤ n ≤ 100). Next lines contains the n * n matrix. The last line contains two integers r and c (1 ≤ r, c ≤ n). All numbers in the matrix are no more than 100 by absolute value.
Output
Print r * c matrix.
Input example #1
4 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 3 2
Output example #1
1 2 5 6 9 1
Input example #12
5 1 5 -3 2 6 6 3 34 5 8 10 12 3 18 -25 13 22 11 9 45 23 39 20 15 -49 4 3
Output example #12
1 5 -3 6 3 34 10 12 3 13 22 11