void main() {
buildTree();
}
void buildTree() {
print('Введите количество этажей :');
var input = stdin.readLineSync();
var inputs = int.parse(input!);
var b = "*";
var branch = [b];
void addBranch() {
final branch1 = branch[0];
if (inputs > 0) {
print(branch1.padLeft(inputs-- ));
for(int i = inputs; i > 0; i--){
var tspaces = "".padLeft( --inputs );
var tree = branch[0] += "**";
print(tspaces+tree);
}
} else {
print("!!!");
}
}
for (var br in branch) {
addBranch();
}
}