#include #include #include #include #include #include #include #include using namespace std; int main(){ string S; cin >> S; string head, cent, tail; if(S.size() % 2 == 0){ head = S.substr(0, S.size() / 2 ); tail = S.substr(S.size() / 2, S.size() - 1); reverse(tail.begin(), tail.end()); for(int i = 0; i < S.size() / 2; i++){ char key; if(head[i] == tail[i]){ if(tail[i] =='>'){ tail[i] = '<'; head[i] = tail[i]; }else{ tail[i] = '>'; head[i] = tail[i]; } } } reverse(tail.begin(), tail.end()); cout << head + tail << endl; }else{ head = S.substr(0, (S.size()-1) / 2); cent = S[(S.size() - 1) / 2]; tail = S.substr((S.size() - 1)/ 2+1 , S.size() - 1); if(cent == "<") { cent = ">"; }else{ cent = "<"; } reverse(tail.begin(), tail.end()); for(int i = 0; i < (S.size() - 1) / 2; i++){ if(head[i] == tail[i]){ if(tail[i] =='>'){ tail[i] = '<'; head[i] = tail[i]; }else{ tail[i] = '>'; head[i] = tail[i]; } } } reverse(tail.begin(), tail.end()); cout << head + cent + tail << endl; } return 0; }