#include <iostream>
using namespace std;
void input(double a[18][24]){
for(int i = 0; i < 18; i++){
for(int j = 0; j < 24; j++){
cin >> a[i][j];
}
}
}
void output(double a[18][24]){
for(int i = 0; i < 18; i++){
for(int j = 0; j < 24; j++){
cout << a[i][j] <<((j == 23)? "\n": " ");
}
}
}
int main() {
double a[18][24];
input(a);
int i , j;
cin >> i >> j;
for(int k = 0; k < 18; k++){
swap(a[k][i-1], a[k][j-1]);
}
output(a);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCnZvaWQgaW5wdXQoZG91YmxlIGFbMThdWzI0XSl7Cglmb3IoaW50IGkgPSAwOyBpIDwgMTg7IGkrKyl7CgkJZm9yKGludCBqID0gMDsgaiA8IDI0OyBqKyspewoJCQljaW4gPj4gYVtpXVtqXTsKCQl9Cgl9Cn0Kdm9pZCBvdXRwdXQoZG91YmxlIGFbMThdWzI0XSl7Cglmb3IoaW50IGkgPSAwOyBpIDwgMTg7IGkrKyl7CgkJZm9yKGludCBqID0gMDsgaiA8IDI0OyBqKyspewoJCQljb3V0IDw8IGFbaV1bal0gPDwoKGogPT0gMjMpPyAiXG4iOiAiICIpOwoJCX0KCX0KfQppbnQgbWFpbigpIHsKCWRvdWJsZSBhWzE4XVsyNF07CglpbnB1dChhKTsKCWludCBpICwgajsKCWNpbiA+PiBpID4+IGo7Cglmb3IoaW50IGsgPSAwOyBrIDwgMTg7IGsrKyl7CgkJc3dhcChhW2tdW2ktMV0sIGFba11bai0xXSk7Cgl9CglvdXRwdXQoYSk7CglyZXR1cm4gMDsKfQ==
MCAxIDIgMyA0IDUgNiA3IDggOSAxMCAxMSAxMiAxMyAxNCAxNSAxNiAxNyAxOCAxOSAyMCAyMSAyMiAyMyAKMCAxIDIgMyA0IDUgNiA3IDggOSAxMCAxMSAxMiAxMyAxNCAxNSAxNiAxNyAxOCAxOSAyMCAyMSAyMiAyMyAKMCAxIDIgMyA0IDUgNiA3IDggOSA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DE5IDIwIDIxIDIyIDIzIAowIDEgMiAzIDQgNSA2IDcgOCA5IDEwIDExIDEyIDEzIDE0IDE1IDE2IDE3IDE4IDE5IDIwIDIxIDIyIDIzIAowIDEgMiAzIDQgNSA2IDcgOCA5IDEwIDExIDEyIDEzIDE0IDE1IDE2IDE3IDE4IDE5IDIwIDIxIDIyIDIzIAowIDEgMiAzIDQgNSA2IDcgOCA5IDEwIDExIDEyIDEzIDE0IDE1IDE2IDE3IDE4IDE5IDIwIDIxIDIyIDIzIAozIDY=
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
3 6