#include <algorithm>
#include <random>
#include <ctime>
#include <cstdlib>
#include <iostream>
#include <iomanip>

int main()
{
    constexpr std::size_t N = 6 ;
    int a[N][N] ;
    auto begin = std::begin( a[0] ) ;
    auto end = std::end( a[N-1] ) ;

    std::iota( begin, end, 1 ) ;
    std::srand( std::time(nullptr) ) ;
    std::seed_seq seed_seq { std::rand(), std::rand(), std::rand(), std::rand() } ;
    std::shuffle( begin, end, std::mt19937(seed_seq) ) ;

    for( const auto& row : a )
    {
        for( int i : row ) std::cout << std::setw(3) << i ;
        std::cout << '\n' ;
    }
}
