~/algor $ cat problems/matritsa-ustunlarni-almashtirish
Swap two columns
Easy
1000 ms
128 MB
30%
A matrix of size $n \times m$ and the numbers of two columns $p$ and $q$ are given. Swap columns $p$ and $q$ and print the resulting matrix.
Input
The first line contains two positive integers $n$ and $m$. Each of the next $n$ lines contains $m$ integers. The last line contains two integers $p$ and $q$.
Output
$n$ lines with $m$ space-separated integers each.
Note
$1 \le n, m \le 200$
$-1000 \le a_{i,j} \le 1000$
$1 \le p, q \le m$
Examples
Input #1
2 3 1 -2 3 -4 5 6 1 3
Output #1
3 -2 1 6 5 -4
Input #2
2 1 1 2 1 1
Output #2
1 2