#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int A, B, N, noDigits = 0, noDigits2;
int A2, A3 = 0, x, power1;
cin >> A >> B;
A2 = A;
int noDigitsB = 0;
while (A !=0) {
A = A / 10;
noDigits++;
}
noDigits2 = noDigits / 2;
while (B !=0) {
B = B / 10;
noDigitsB++;
}
// if(noDigits % 2 == 0){
while (A2 != 0) {
power1 = pow(10, noDigits - 1);
if (noDigits2 < noDigits) {
x = A2 / pow(10, noDigits - 1); //
A3 = A3 + (x * pow(10, noDigits - 1)); //
cout << A3 << "\n";
}
else if (noDigits2 >= noDigits) {
// ...
}
A2 = A2 % power1;
noDigits--;
}
cout << A2;
// }
return 0;
}