Build the rows
The outer loop sets each row length, and a preceding inner loop prints the alignment spaces.
The right-aligned rows grow from A to AB, ABC, ABCD, and ABCDE.
The outer loop sets each row length, and a preceding inner loop prints the alignment spaces.
The z counter restarts at 1; chr(z + 64) turns it into a growing alphabet prefix with gaps between letters.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.