#include<bits/stdc++.h> using namespace std; int main(){ int m, y, d; scanf("%d-%d-%d", &d,&y,&m); printf("%d-%d-%d",m,d,y); return 0; }