PATTERN1 - Simple Pattern !!

Today Yogesh learned about the loops and its application in his programming classes. One application which the professor told was about printing the patterns, the pattern which Yogesh learned was

                            1
                            123
                            12345
                            1234567

Yogesh is given an assignment to print a pattern using letters (capital only) up to n lines of following format
                            
                            ABCD
                            BCD
                            CD
                            D

Now Yogesh is unable to find the solution. So he has come to you, as you are his good friend you have to help him.

Input

The input consists of a number N (<= 26), the number of lines up to which the pattern is to be printed.

Output

For the input N, print the pattern.

Example

Input:
5

Output:
ABCDE
BCDE
CDE
DE
E
Input:
8

Output:
ABCDEFGH
BCDEFGH
CDEFGH
DEFGH
EFGH
FGH
GH
H

Added by:Aditya Dixit
Date:2013-09-03
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2022-09-02 07:42:51
code is not accepting eventhough its correct



Last edit: 2022-09-02 07:43:56
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.