#include<iostream>
(资料图片)
using namespace std;
int main(){
int a,ge,shi,bai,qian;
a=9876;
ge=a%10;
shi=(a%100)/10;
bai=(a%1000)/100;
qian=a/1000
a=ge*1000+shi*100+bai*10+qian;
cout<<a<<endl;
}