11600 - 231001_10/12_practice4-2   

Description

Let the user input an integer n > 0, followed by a “pattern”, represented by another integer.

There are three kinds of pattern:

If pattern is 1, print an inverted right triangle with the same number such as the first sample output.

If pattern is 2, print an inverted right triangle with reverse order such as the second sample output.

If pattern is neither 1 nor 2, your program should print the message such as the third sample output.

Input

Two integers, represent n and pattern respectively. These two integers is separated by a space.

Output

An inverted right triangle or the message. There is a new line after an inverted right triangle or the message.

Sample Input  Download

Sample Output  Download

Tags




Discuss