def print_christmas_tree(height):
# 打印圣诞树的叶子部分
for i in range(height):
print(' ' * (height - i - 1) + '*' * (2 * i + 1))
# 打印树干
trunk_width = height // 3
trunk_height = height // 5 + 1
space_before_trunk = height - trunk_width // 2 - 1
for _ in range(trunk_height):
print(' ' * space_before_trunk + '|' * trunk_width)
# 设置圣诞树的高度
tree_height = 5
print_christmas_tree(tree_height)