#include<bits/stdc++.h> using namespace std; int main(){ int nian,yue,ri; char a,b; cin>>ri>>a>>nian>>b>>yue; cout<<yue<<a<<ri<<b<<nian; return 0; }