#include <iostream>
#include <limits.h>
using namespace std;
 
struct type_t {
    int a;
    int b;
};
 
int main() {
    
    const int x(5000), y(5000), z(5000);
    
    type_t*** a;
    
    /* L1 Alloc */
    a = new(nothrow) type_t** [x];
    if( a == nullptr ) cerr << "Error at L1!" << endl;
    
    /* L2 Alloc */
    for( int i = 0; i < x; i++) {
        a[i] = new(nothrow) type_t* [y];
        if( a[i] == nullptr ) {
            cout << "Error at L2!" << endl;
            abort();
        }
    }
    
    /* L3 Alloc */
    for( int i = 0; i < x; i++) {
        for( int j = 0; j < y; j++) {
            a[i][j] = new(nothrow) type_t [z];
            if( a[i][j] == nullptr ) {
                cout << "Error at L3!" << endl;
                abort();
            }
        }
    }
    
    return 0;
}