#include <bits/stdc++.h>

using namespace std;

int main(){
    string field;
    cin >> field;
    string ans;

    bool player = true;
    while(1){
        bool isFinished = true;

        ans = field.substr(0, 1);
        for(int i=0; i < field.size(); i++) if(ans != field.substr(i, 1)) isFinished = false;
        if(isFinished) break;

        if(player){
            if(field.substr(0, 1) != "x" && field.substr(field.size()-1, 1) != "x");
            else if(field.substr(0, 1) != "x"){
                for(int i = field.size()-1; 0 <= i; i--){
                    if(field.substr(i, 1) == "o") break;
                    else field.replace(i, 1, "o");
                }
                field = "o" + field;
            }
            else if(field.substr(field.size()-1, 1) != "x"){
                for(int i=0; i < field.size(); i++){
                    if(field.substr(i, 1) == "o") break;
                    else field.replace(i, 1, "o");
                }
                field = field + "o";
            }
            else {
                int n=0, m=0;
                for(int i = field.size()-1; 0 <= i; i--){
                    if(field.substr(i, 1) == "o") break;
                    else n++;
                }
                for(int i=0; i < field.size(); i++){
                    if(field.substr(i, 1) == "o") break;
                    else m++;
                }
                if(n < m){
                    for(int i=0; i < field.size(); i++){
                        if(field.substr(i, 1) == "o") break;
                        else field.replace(i, 1, "o");
                    }
                    field = "o" + field;
                }else {
                    for(int i = field.size()-1; 0 <= i; i--){
                        if(field.substr(i, 1) == "o") break;
                        else field.replace(i, 1, "o");
                    }
                    field = field + "o";
                }
            }
        }else {
            if(field.substr(0, 1) != "o" && field.substr(field.size()-1, 1) != "o");
            else if(field.substr(0, 1) != "o"){
                for(int i = field.size()-1; 0 <= i; i--){
                    if(field.substr(i, 1) == "x") break;
                    else field.replace(i, 1, "x");
                }
                field = "x" + field;
            }
            else if(field.substr(field.size()-1, 1) != "o"){
                for(int i=0; i < field.size(); i++){
                    if(field.substr(i, 1) == "x") break;
                    else field.replace(i, 1, "x");
                }
                field = field + "x";
            }
            else {
                int n=0, m=0;
                for(int i = field.size()-1; 0 <= i; i--){
                    if(field.substr(i, 1) == "x") break;
                    else n++;
                }
                for(int i=0; i < field.size(); i++){
                    if(field.substr(i, 1) == "x") break;
                    else m++;
                }
                if(n < m){
                    for(int i=0; i < field.size(); i++){
                        if(field.substr(i, 1) == "x") break;
                        else field.replace(i, 1, "x");
                    }
                    field = "x" + field;
                }else {
                    for(int i = field.size()-1; 0 <= i; i--){
                        if(field.substr(i, 1) == "x") break;
                        else field.replace(i, 1, "x");
                    }
                    field = field + "x";
                }
            }

        }
        player = !player;
    }
    cout << ans << endl;
}

Measured memory_bytes: 1196