Multilevel inheritances C++ program to display pattern like the right angle

Write a program in C++ to make such a pattern like the right angle triangle with a number that will repeat a number in a row using the multilevel inheritances in object-oriented programming.

c++ palindrome program without arrays
class diagram of pattern like the right angle Multi-level Inheritance

pattern of right angle triangle C++