Geek is very fond of patterns. Once, his teacher gave him a pattern to solve. He gave Geek an integer n and asked him to build a pattern.
Help Geek to build the pattern.
 
Example 1:
Input: 5
Output:
ABCDE
ABCD
ABC
AB
A
 
Your Task:
You don't need to input anything. Complete the function printTriangle() which takes  an integer n  as the input parameter and print the pattern.
Constraints:
	1<= N <= 20

Source: geeksforgeeks | Difficulty: EASY

Starter code: #User function Template for python3



class Solution:

    def printTriangle(self, N):

        # Code here

Solutions:
class Solution:

	def printTriangle(self, N):
		for i in range(N):
			letter = 'A'
			for j in range(N - i):
				print(letter, end='')
				letter = chr(ord(letter) + 1)
			print()


class Solution:

	def printTriangle(self, N):
		for i in range(N):
			for j in range(N - i):
				print(chr(65 + j), end='')
			print('')


import string

class Solution:

	def printTriangle(self, N):
		lis = list(string.ascii_uppercase)
		for i in range(N, 0, -1):
			for j in range(0, i):
				print(lis[j], end='')
			print(end='\n')


class Solution:

	def printTriangle(self, N):
		for i in range(N):
			for ch in range(ord('A'), ord('A') + N - i):
				print(chr(ch), end='')
			print()


class Solution:

	def printTriangle(self, N):
		import string
		l = string.ascii_uppercase
		for i in range(1, N + 1, 1):
			print(l[0:N - i + 1])


import string

class Solution:

	def printTriangle(self, N):
		alpha = string.ascii_uppercase
		for x in range(N, 0, -1):
			print(alpha[:x])


class Solution:

	def printTriangle(self, N):
		for i in range(N, 0, -1):
			x = 65
			for j in range(i):
				print(chr(x), end='')
				x += 1
			print()


class Solution:

	def printTriangle(self, N):
		i = 1
		while i <= N:
			j = 1
			while j <= N - i + 1:
				print(chr(ord('A') + j - 1), end='')
				j += 1
			print()
			i += 1


class Solution:

	def printTriangle(self, n):
		for i in range(1, n + 1):
			for j in range(1, n - i + 2):
				print(chr(64 + j), end='')
			print()


class Solution:

	def printTriangle(self, N):
		for x in range(N, 0, -1):
			for (y, z) in zip(range(x), range(ord('A'), ord('Z') + 1)):
				print(chr(z), end='')
			print('\r')


class Solution:

	def printTriangle(self, N):
		for x in range(N, 0, -1):
			for y in range(x):
				print(chr(65 + y), end='')
			print()
		return


class Solution:

	def printTriangle(self, N):
		a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
		for i in range(N):
			print(*a[:N - i], sep='')


class Solution:

	def printTriangle(self, N):
		letter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
		for row in range(N, 0, -1):
			for i in range(1, row + 1):
				print(letter[i - 1], end='')
			print('')


class Solution:

	def printTriangle(self, n):
		for i in range(n):
			val = 'A'
			for j in range(n - i):
				print(val, end='')
				val = chr(ord(val) + 1)
			print()


class Solution:

	def printTriangle(self, N):
		string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
		for i in range(N, 0, -1):
			for j in range(0, i):
				print(string[j], end='')
			print()


class Solution:

	def printTriangle(self, N):
		start = ord('A')
		for i in range(N):
			for j in range(N - i):
				print(chr(start + j), end='')
			print()


class Solution:

	def printTriangle(self, N):
		a = 64
		for i in range(0, N):
			for j in range(0, N - i):
				print(chr(j + a + 1), end='')
			print()


class Solution:

	def printTriangle(self, N):
		for i in range(N + 1, -1, -1):
			ch = 65
			for j in range(1, i):
				if j == i - 1:
					print(chr(ch))
				else:
					print(chr(ch), end='')
				ch += 1


class Solution:

	def printTriangle(self, N):
		ch = 'A'
		for i in range(N, 0, -1):
			for k in range(i, 0, -1):
				print(ch, end='')
				ch = chr(ord(ch) + 1)
			print()
			ch = 'A'


class Solution:

	def printTriangle(self, n):
		for i in range(n - 1, -1, -1):
			alpha = 65
			for j in range(i + 1):
				print(chr(alpha + j), end='')
			print()


import string

class Solution:

	def printTriangle(self, N):
		alphabets = list(string.ascii_uppercase)
		for i in range(0, N):
			for j in range(0, N):
				if j < N - i:
					print(alphabets[j], end='')
				else:
					break
			print('\n', end='')


class Solution:

	def printTriangle(self, N):
		string1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
		k1 = N
		for i in range(0, N):
			k = 0
			for j in range(0, k1):
				print(string1[k], end='')
				k += 1
			k1 -= 1
			print('\r')


class Solution:

	def printTriangle(self, N):
		s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
		for j in range(N):
			print(s[0:N - j])


class Solution(object):

	def printTriangle(self, N):
		for row in range(N, 0, -1):
			val = 65
			for col in range(val, val + row):
				print(chr(col), end='')
			print()