#include <iostream>
using namespace std;
#include <cmath>
int main() {
const int n = 25 ;
int a[n] , b[n] ,q=1 ;
for (size_t i = 0 ; i < n ; i++){
a[i] = 150 + pow(q,2);
//cout << " [ " << i+1 << " ] = " << a[i] << endl ;
cout << a[i] << " " ;
b[i] = a[i] ;
q++;
}
int x1, y1;
cin >> x1 >> y1 ;
cout << endl << "1й = " << x1 << endl ;
cout << "2й = " << y1 << endl ;
int x=0 ;
for (size_t i = 0 ; i < n ; i++){
if (i+1 == x1){
x = i+2 ;
for (size_t j = i ; j < n-1 ; j++){
b[j] = a[x];
x++;
}
}
if (i+1 == x1){
x = i+2 ;
for (size_t j = i ; j < n-1; j++){
b[j] = a[x];
x++;
}
}
}
for (size_t i = 0 ; i < n-2 ; i++){
//cout << " [ " << i+1 << " ] = " << a[i] << endl ;
cout << b[i] << " " ;
}
return 0;
}