<?php
$c = trim(fgets(STDIN)); // 读取输入字符(去除换行符)
for ($i = 0; $i < 5; $i++) {
    $space = abs($i - 2); // 正确:空格数=行数与中间行的距离(2→1→0→1→2)
    $char = 5 - 2 * $space; // 字符数=5-2*空格数(1→3→5→3→1)
    echo str_repeat(' ', $space) . str_repeat($c, $char) . PHP_EOL;
}
?>