#include <string>
#include <algorithm>
#include <iostream>

int main()
{
    std::string moves = "xxxxxoooo";
    sort(begin(moves), end(moves));

    while ( std::next_permutation(moves.begin(), moves.end()) )
    {
        std::cout << moves << std::endl;
    }
}
