#include<iostream>
#include<iomanip>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
class Square{
public:
int l;
public:
Square(int a)
{
l=a;
cout<<"Construct Square ("<<l<<")"<<endl;
}
int length()
{
return l;
}
int perimeter()
{
return 4*l;
}
int area()
{
return l*l;
}
};
class Rectangle:public Square{
public:
int w;
public:
Rectangle(int a,int b):Square(a)
{
w=b;
cout<<"Construct Rectangle ("<<l<<", "<<w<<")"<<endl;
}
int length()
{
return l;
}
int width()
{
return w;
}
int perimeter()
{
return 2*(l+w);
}
int area()
{
return l*w;
}
};
class Cuboid:public Rectangle{
public:
int h;
public:
Cuboid(int a,int b,int c):Rectangle(a,b)
{
h=c;
cout<<"Construct Cuboid ("<<l<<", "<<w<<", "<<h<<")"<<endl;
}
int length()
{
return l;
}
int width()
{
return w;
}
int height()
{
return h;
}
int perimeter()
{
return 4*(l+w+h);
}
int area()
{
return 2*(l*w+l*h+w*h);
}
int volume()
{
return l*w*h;
}
};
int main()
{
int cases, l, w, h;
cin >> cases;
for(int i = 1; i <= cases; ++i)
{
cin >> l;
Square squa(l);
cout << "A Square length " << squa.length() << ", ";
cout << "Perimeter " << squa.perimeter() << ", ";
cout << "Area " << squa.area() << endl;
}
cout << "=========================" << endl;
cin >> cases;
for(int i = 1; i <= cases; ++i)
{
cin >> l >> w;
Rectangle rect(l, w);
cout << "A Rectangle length " << rect.length() << ", width " << rect.width() << ", ";
cout << "Perimeter " << rect.perimeter() << ", ";
cout << "Area " << rect.area() << endl;
}
cout << "=========================" << endl;
cin >> cases;
for(int i = 1; i <= cases; ++i)
{
cin >> l >> w >> h;
Cuboid cubo(l, w, h);
cout << "A Cuboid length " << cubo.length() << ", width " << cubo.width() << ", height " << cubo.height() << ", ";
cout << "Perimeter " << cubo.perimeter() << ", ";
cout << "Area " << cubo.area() << ", ";
cout << "Volume " << cubo.volume() << endl;
}
}