#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <ctime>
int main()
{
    std::srand(std::time(NULL));
    
    char Grid[5][5] = {'G', 'P', 'W', 'P'};
    std::random_shuffle(&Grid[0][0], &Grid[0][0] + 5*5);

    for(int r = 0; r < 5; ++r)
    {
        for(int c = 0; c < 5; ++c)
            std::cout << (Grid[r][c] ? Grid[r][c] : '_') << ' ';
        std::cout << '\n';
    }
}
