A pangram is a string that contains every letter of the alphabet.  Given a sentence determine whether it is a pangram in the English alphabet.  Ignore case.  Return either pangram or not pangram as appropriate.

Example 

$s=\text{'The quick brown fox jumps over the lake dog'}$  

The string contains all letters in the English alphabet, so return pangram.

Function Description

Complete the function pangrams in the editor below.  It should return the string pangram if the input string is a pangram.  Otherwise, it should return not pangram.  

pangrams has the following parameter(s):

string s: a string to test  

Returns  

string: either pangram or not pangram  

Input Format

A single line with string $s$. 

Constraints

$0<\text{length of}s\le10^3$ 

Each character of $s$, $s[i]\in\{a-z,A-Z,space\}$

Sample Input

Sample Input 0  

We promptly judged antique ivory buckles for the next prize

Sample Output 0

pangram

Sample Explanation 0

All of the letters of the alphabet are present in the string.  

Sample Input 1  

We promptly judged antique ivory buckles for the prize

Sample Output 1

not pangram

Sample Explanation 0

The string lacks an x.

Difficulty: EASY
Tags: String algorithms

Starter code:

Solutions:
alphabet = 'abcdefghijklmnopqrstuvwxyz'

def pg(x):
	for letter in alphabet:
		if letter not in x:
			return False
	return True
sentence = input()
sentence = sentence.lower()
if pg(sentence):
	print('pangram')
else:
	print('not pangram')


s = input()
t = set((c.lower() for c in s if c != ' '))
print('pangram' if len(t) == 26 else 'not pangram')


print('pangram' if len(set(input().lower() + ' ')) >= 27 else 'not pangram')


s = input()
alpha_set = set((char for char in s.lower() if char.isalpha()))
print('pangram' if len(alpha_set) == 26 else 'not pangram')


n = [False] * 26
for c in input().lower():
	if c != ' ':
		n[ord(c) - ord('a')] = True
print('pangram' if all(n) else 'not pangram')


import sys
Alpha = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
inAlpha = set(sys.stdin.readline().upper())
if Alpha == inAlpha.intersection(Alpha):
	print('pangram')
else:
	print('not pangram')


sntc = input().lower()
ltrs = []
for i in range(len(sntc)):
	ltr = ord(sntc[i])
	if ltr >= 97 and ltr <= 122:
		if ltr not in ltrs:
			ltrs.append(ltr)
if len(ltrs) == 26:
	print('pangram')
else:
	print('not pangram')


x = input()
lst1 = []
lst2 = []
for z in range(65, 91):
	lst1.append(chr(z))
for char in x:
	if char != ' ':
		if char.upper() not in lst1:
			break
		elif char.upper() not in lst2 and char.upper() in lst1:
			lst2.append(char.upper())
if len(lst2) == 26:
	print('pangram')
else:
	print('not pangram')


s = input()
s = s.lower()
a = [0 for i in range(0, 26)]
x = 0
for i in s:
	if i != ' ' and a[ord(i) - ord('a')] == 0:
		a[ord(i) - ord('a')] += 1
		x += 1
if x == 26:
	print('pangram')
else:
	print('not pangram')


s = input()
s = s.lower()
s = set(s)
n = len(s)
if n == 27 and ' ' in s or (n == 26 and ' ' not in s):
	print('pangram')
else:
	print('not pangram')


line = str(input())
line = line.lower()
line = line.replace(' ', '')
if len(set(line)) == 26:
	print('pangram')
else:
	print('not pangram')


l = []
raw_input = input()
raw_input = raw_input.lower()
l = [ord(x) for x in list(raw_input)]
myset = set(l)
if len(myset) == 27:
	print('pangram')
else:
	print('not pangram')


import string
s = set(''.join(input().lower().split()))
a = set(string.ascii_lowercase)
print('pangram' if len(a - s) == 0 else 'not pangram')


s = input()
for i in 'abcdefghijklmnopqrstuvwxzy':
	if i not in s.lower():
		print('not pangram')
		exit()
print('pangram')


import string
sentence = input().strip().upper()
letters = set(string.ascii_uppercase)
for c in sentence:
	if c in letters:
		letters.remove(c)
if len(letters) == 0:
	print('pangram')
else:
	print('not pangram')


s = input()
a = [0 for i in range(0, 26)]
s = s.lower()
re = 0
for i in s:
	if i == ' ':
		continue
	x = ord(i) - ord('a')
	if a[x] == 0:
		re += 1
		a[x] += 1
if re == 26:
	print('pangram')
else:
	print('not pangram')


s = set(list(input().lower()))
letters = []
for i in range(97, 122):
	letters.append(i)
for (i, element) in enumerate(s):
	if ord(element) in letters:
		letters.remove(ord(element))
if len(letters) > 0:
	print('not', end=' ')
print('pangram')


import sys

def prepare_pangram_dict(pdict):
	for x in range(97, 123):
		pdict[chr(x)] = 0

def test_pgram(line):
	pdict = dict()
	prepare_pangram_dict(pdict)
	for char in line:
		if char.lower() in pdict:
			pdict[char.lower()] += 1
	for key in pdict:
		if pdict[key] < 1:
			print('not pangram')
			return
	print('pangram')

def main():
	for line in sys.stdin:
		test_pgram(line)
main()


def pangram(string):
	abc = 'abcdefghijklmnopqrstuvwxyz'
	l = len(abc)
	n = string.lower()
	c = 0
	for i in abc:
		if i in n:
			c = c + 1
		else:
			return print('not pangram')
	if c >= l:
		return print('pangram')
string = input('')
pangram(string)


import string
print('pangram' if set(input().lower().replace(' ', '')) >= set(string.ascii_lowercase) else 'not pangram')


x = input()
x = x.replace(' ', '').lower()
master = 'abcdefghijklmnopqrstuvwxyz'
have_bug = False
if len(x) > 26:
	for i in range(0, len(master)):
		if master[i] not in x:
			have_bug = True
			break
		else:
			have_bug = False
	if have_bug:
		print('not pangram')
	else:
		print('pangram')
else:
	print('not pangram')


s = input()
t = [0 for i in range(0, 26)]
for i in s:
	if i.isalpha():
		t[ord(i.upper()) - 65] += 1
for i in t:
	if i == 0:
		print('not pangram')
		quit()
print('pangram')


alpha = ['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']
string = input()
for i in string.lower():
	if len(alpha) > 0:
		if i in alpha:
			alpha.remove(i)
if len(alpha) >= 1:
	print('not pangram')
else:
	print('pangram')


def is_pangram(alphabet):
	for letter in alphabet:
		if alphabet[letter] == 0:
			return 'not pangram'
	return 'pangram'
string = str(input()).lower()
alphabet = {}
for i in range(97, 123):
	alphabet[chr(i)] = 0
for char in string:
	if 96 < ord(char) < 123:
		alphabet[char] += 1
print(is_pangram(alphabet))


import string
line = set(input().lower())
setofalpha = set(string.ascii_lowercase)
result = setofalpha - line
if result:
	print('not pangram')
else:
	print('pangram')


import string
s = str(input()).lower()
result = 'pangram'
for i in string.ascii_lowercase:
	if i not in s:
		result = 'not ' + result
		break
print(result)


def main():
	line = input().lower()
	letters = [False for _ in range(26)]
	for char in line:
		index = ord(char) - 97
		if index >= 0 and index < 26:
			letters[index] = True
	for letterShown in letters:
		if not letterShown:
			print('not pangram')
			return
	print('pangram')
main()


s = input()
l = not set('abcdefghijklmnopqrstuvwxyz') - set(s.lower())
if l == True:
	print('pangram')
else:
	print('not pangram')


phrase = input()
letters = 0
all_letters = (1 - (1 << 26)) * -1
for c in phrase:
	if c != ' ':
		letters |= 1 << ord(c.lower()) - 97
if letters & all_letters == all_letters:
	print('pangram')
else:
	print('not pangram')


import sys, string
sentence = sys.stdin.readline().lower()
is_pangram = True
for char in string.ascii_lowercase:
	if sentence.count(char) == 0:
		is_pangram = False
		break
print('pangram' if is_pangram else 'not pangram')


line = input().lower().replace(' ', '')
if len(line) < 26:
	print('not pangram')
else:
	letters = {}
	for c in line:
		if not c in letters:
			letters[c] = 1
	if len(letters) < 26:
		print('not pangram')
	else:
		print('pangram')


import string
text = input()
alphabet = {letter: 0 for letter in string.ascii_lowercase}
for char in text:
	for letter in alphabet:
		if char.lower() == letter:
			alphabet[letter] += 1
if all((v > 0 for v in alphabet.values())):
	print('pangram')
else:
	print('not pangram')


test = str(input())
test = test.replace(' ', '')
test = test.lower()
test = list(test)
alph = list(map(chr, range(97, 123)))
new = list(set(alph) - set(test))
if new == []:
	print('pangram')
else:
	print('not pangram')


s = input().lower()
l = ['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']
i = 0
while i < 26:
	if s.count(l[i]) == 0:
		print('not pangram')
		break
	i += 1
if i == 26:
	print('pangram')


def main():
	sentence = input('')
	sentence = sentence.lower()
	alpha = set('abcdefghijklmnopqrstuvwxyz')
	diff = alpha - set(sentence)
	if not diff:
		print('pangram')
	else:
		print('not pangram')
main()


import string
s = input()
s = s.lower()
isPangram = True
for letter in string.ascii_lowercase:
	isPangram = isPangram and letter in s
if isPangram:
	print('pangram')
else:
	print('not pangram')


s = input()
if len(s) >= 1 and len(s) <= 1000:
	s = s.lower()
	letters = ['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']
	flag = 0
	for i in letters:
		if i not in s:
			flag = 1
			break
	if flag == 0:
		print('pangram')
	else:
		print('not pangram')


l = ['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']
lst = []
x = input()
y = x.lower()
for i in range(len(y)):
	if y[i] in l:
		lst.append(y[i])
out = 'pangram'
for j in range(len(l)):
	if l[j] not in lst:
		out = 'not pangram'
print(out)


pangram = 1
numA = ord('a')
numZ = ord('z')
sentence = input()
sentence = sentence.lower()
alphabet = list()
for i in range(numA, numZ + 1):
	alphabet.append(chr(i))
for i in alphabet:
	if sentence.find(i) == -1:
		pangram = 0
if pangram == 1:
	print('pangram')
if pangram == 0:
	print('not pangram')


words = set([])
sentence = input()
if set(sentence.lower()).issuperset(set('abcdefghijklmnopqrstuvwxyz')):
	print('pangram')
else:
	print('not pangram')


def pangram(s: str):
	alpha = 'qwertyuiopasdfghjklzxcvbnm'
	new = []
	for c in s:
		if c in alpha and c not in new:
			new.append(c)
		if len(new) == 26:
			print('pangram')
			return
	print('not pangram')
pangram(input().lower())


import string
line = input().lower()
for letter in string.ascii_lowercase:
	if letter not in line:
		print('not ', end='')
		break
print('pangram')


import string
test = input().strip()
if all((char in test.lower() for char in string.ascii_lowercase)):
	print('pangram')
else:
	print('not pangram')


char_set = {i for i in range(97, 123)}
for ch in input():
	try:
		char_set.remove(ord(ch.lower()))
	except KeyError:
		pass
	else:
		if len(char_set) == 0:
			print('pangram')
			import sys
			sys.exit(0)
print('not pangram')


def main():
	s = input()
	s = s.lower()
	s = s.replace(' ', '')
	pan = set(s)
	if len(pan) == 26:
		print('pangram')
	else:
		print('not pangram')
main()


s = str(input()).lower()
l = []
for i in s:
	if i != ' ':
		if i not in l:
			l.append(i)
if len(l) == 26:
	print('pangram')
else:
	print('not pangram')


st = input()
arr = [0] * 26
cnt = 0
for x in st:
	if x != ' ':
		c = ord(x.lower()) - ord('a')
		if arr[c] == 0:
			arr[c] = 1
			cnt += 1
			if cnt == 26:
				break
if cnt == 26:
	print('pangram')
else:
	print('not pangram')


__author__ = 'neki'
import sys
alphabet = 'abcdefghijklmnopqrstuvwxyz'
vis = {}
for i in range(len(alphabet)):
	vis[alphabet[i]] = 0
line = input().lower()
for ch in line:
	if ch in vis:
		vis[ch] += 1
for i in alphabet:
	if vis[i] == 0:
		print('not pangram')
		break
else:
	print('pangram')


s = set(input().lower())
c = ' '
if len(s) == 27 or (len(s) == 26 and c not in s):
	print('pangram')
else:
	print('not pangram')


def f(st):
	st = st.lower()
	m = [0] * 26
	c = 26
	for i in st:
		if i != ' ' and m[ord(i) - ord('a')] != 1:
			m[ord(i) - ord('a')] = 1
			c -= 1
	return c == 0
print('pangram' if f(input()) else 'not pangram')


i = input()
s = {}
for c in i:
	if 'a' <= c.lower() <= 'z':
		s[c.lower()] = 1
if len(s) == 26:
	print('pangram')
else:
	print('not pangram')


line = input('').lower()
alp = {}
for i in range(97, 123):
	alp[chr(i)] = 0
c = 0
for i in line:
	if i != ' ':
		if alp[i] == 0:
			c += 1
		alp[i] += 1
if c == 26:
	print('pangram')
else:
	print('not pangram')


inputs = input()
alpha = {}
for i in range(0, len(inputs)):
	ch = inputs[i:i + 1].lower()
	if ord('a') <= ord(ch) <= ord('z'):
		if not ch in alpha:
			alpha[ch] = 1
if len(alpha) == 26:
	print('pangram')
else:
	print('not pangram')


def is_sentence_a_pangram(sentence):
	sorted_sentence = ''.join(sorted(sentence.lower()))
	sorted_sentence = sorted_sentence.strip()
	return all((ord(y) - ord(x) <= 1 for (x, y) in zip(sorted_sentence, sorted_sentence[1:]))) and (sorted_sentence[0] == 'a' and sorted_sentence[-1] == 'z')
sentence = input()
is_pangram = is_sentence_a_pangram(sentence)
if is_pangram:
	print('pangram')
else:
	print('not pangram')


def is_panagram(s):
	s = s.lower().replace(' ', '')
	d = [0] * 26
	for letter in s:
		d[ord(letter) - ord('a')] += 1
	if 0 in d:
		print('not pangram')
	else:
		print('pangram')
s = input()
is_panagram(s)


s = str(input()).lower()
l = len(s)
k = 1
a = [0] * 26
for i in range(l):
	if s[i] != ' ':
		a[ord(s[i]) - 97] += 1
for i in range(26):
	if a[i] == 0:
		k = 0
		break
if k == 1:
	print('pangram')
else:
	print('not pangram')


def pangrams(string):
	alpha = set(list('abcdefghijklmnopqrstuvwxyz'))
	string = set(list(string.replace(' ', '').lower()))
	print('pangram') if string == alpha else print('not pangram')
string = str(input())
pangrams(string)


def main():
	string = input()
	is_pangram = lambda s: not set('abcdefghijklmnopqrstuvwxyz') - set(s.lower())
	if is_pangram(string):
		print('pangram')
	else:
		print('not pangram')
main()


import re, string
s = [c for c in input()]
alpha = set()
for c in s:
	if c.lower().isalpha():
		alpha.add(c.lower())
	if len(alpha) == 26:
		print('pangram')
		break
if len(alpha) < 26:
	print('not pangram')


import fileinput
with fileinput.input() as stdin:
	used_letters = [False] * 26
	for line in stdin:
		for char in line.lower().replace(' ', ''):
			index = ord(char) - ord('a')
			used_letters[index] = True
	pangram = True
	for used in used_letters:
		if not used:
			pangram = False
			break
	if pangram:
		print('pangram')
	else:
		print('not pangram')


x = input()
x = x.lower()
s = set(x)
x_ = list(s)
x_.sort()
try:
	x_.remove(' ')
except:
	pass
l = len(x_)
if l >= 26:
	print('pangram')
else:
	print('not pangram')


import sys
import math
N = input().lower()
letters = 'abcdefghijklmnopqrstuvwxyz'
pangram = 1
for c in letters:
	if not c in N:
		pangram = 0
		break
if pangram:
	print('pangram')
else:
	print('not pangram')


import fileinput
import string

def pangram(line):
	letters = {key: value for (key, value) in [(i, False) for i in string.ascii_lowercase]}
	for i in [i.lower() for i in line]:
		if letters.get(i) == False:
			letters[i] = True
	for (i, j) in letters.items():
		if not j:
			print('not pangram')
			return
	print('pangram')
for line in fileinput.input():
	pangram(line)


alphabet = 'qwertyuiopasdfghjklzxcvbnm'
s = input().lower()
if all((letter in s for letter in alphabet)):
	print('pangram')
else:
	print('not pangram')


import string

def pangram(s):
	sortedS = []
	newsortedS = []
	for c in s:
		if c != ' ':
			sortedS.append(c)
	sortedS = sorted(sortedS)
	for c in sortedS:
		if c not in newsortedS:
			newsortedS.append(c)
	return newsortedS == list(string.ascii_lowercase)
s = input()
s = s.lower()
if pangram(s) is False:
	print('not pangram')
else:
	print('pangram')


s = input()
buckets = [0] * 26
for ch in s:
	if ord('a') <= ord(ch) and ord(ch) <= ord('z'):
		buckets[ord(ch) - ord('a')] += 1
	if ord('A') <= ord(ch) and ord(ch) <= ord('Z'):
		buckets[ord(ch) - ord('A')] += 1
print('not pangram' if 0 in buckets else 'pangram')


alphabet = {'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'}
line = input()
letters = {c for c in line.lower()}
if letters.issuperset(alphabet):
	print('pangram')
else:
	print('not pangram')


from string import ascii_lowercase
sentence = input()
sentence = sentence.replace(' ', '')
sentence = sentence.lower()
if len(sentence) < 26:
	print('not pangram')
else:
	flag = True
	for letter in ascii_lowercase:
		if sentence.count(letter) == 0:
			flag = False
	if flag == True:
		print('pangram')
	else:
		print('not pangram')


import string
line = list(input().lower())
if all(map(lambda x: x in line, string.ascii_lowercase)):
	print('pangram')
else:
	print('not pangram')


import sys
s = str(input()).lower()
mydict = 'abcdefghijklmnopqrstuvwxyz'
for ch in mydict:
	if s.count(ch) == 0:
		print('not pangram')
		sys.exit()
print('pangram')


import string
letter = string.ascii_lowercase
letters = letter.__add__(' ')
word = input()
l = []
for i in word:
	t = i.lower()
	l.append(t)
	if l.count(t) > 1:
		l.remove(t)
count = len(l)
if count == 27 or count == 28:
	print('pangram')
else:
	print('not pangram')


inp = input()
inp = inp.lower()
arr = []
for i in range(26):
	arr.append(0)
for i in range(len(inp)):
	if inp[i] != ' ':
		arr[ord(inp[i]) - 97] = 1
if sum(arr) == 26:
	print('pangram')
else:
	print('not pangram')


import sys
result = [None] * 26

def isPanagram(line):
	for letter in line:
		asciiValue = ord(letter.lower()) - 97
		if asciiValue >= 0 and asciiValue < 26:
			result[asciiValue] = letter
	for i in result:
		if i == None:
			return False
	return True
for line in sys.stdin:
	print('pangram' if isPanagram(line) else 'not pangram')


import sys
str = input()
str = str.lower()
match = 'abcdefghijklmnopqrstuvwxyz'
length = len(match)
count = 0
while count < length:
	x = str.count(match[count])
	if x == 0:
		flag = 0
		count = count + 1
		print('not pangram')
		sys.exit()
	else:
		flag = 1
		count = count + 1
print('pangram')


s = input()
s = ''.join(s.split())
s = s.lower()
pangram_c = 0
pangram_d = dict()
for char in s:
	if (char in pangram_d) == False:
		pangram_d[char] = 1
		pangram_c += 1
		if pangram_c == 26:
			break
	else:
		pangram_d[char] = pangram_d[char] + 1
if pangram_c == 26:
	print('pangram')
else:
	print('not pangram')


def checkPanagram(aStr):
	lowerStr = aStr.lower()
	arr = ['q', 'a', 'z', 'w', 's', 'x', 'e', 'd', 'c', 'r', 'f', 'v', 't', 'g', 'b', 'y', 'h', 'n', 'u', 'j', 'm', 'i', 'k', 'o', 'l', 'p']
	for aChar in arr:
		if not aChar in lowerStr:
			return 'not pangram'
	return 'pangram'
one = input()
print(checkPanagram(one))


s = set(map(lambda x: x.lower(), list(input())))
s.discard(' ')
if len(s) == 26:
	print('pangram')
else:
	print('not pangram')


freqMap = [0 for i in range(26)]
s = input()
s = s.lower()
s = s.replace(' ', '')
for c in s:
	freqMap[ord(c) - ord('a')] += 1
check = 0
for i in freqMap:
	if i == 0:
		check = 1
		print('not pangram')
		break
if check == 0:
	print('pangram')


s = set(input().lower())
if ' ' in s:
	s.remove(' ')
if len(s) == 26:
	print('pangram')
else:
	print('not pangram')


import collections

def prog():
	line = str(input()).replace(' ', '').lower()
	c = collections.Counter(line)
	if len(c.keys()) == 26:
		print('pangram')
	else:
		print('not pangram')
prog()


import fileinput
from collections import Counter
import string
import sys
for s in fileinput.input():
	c = Counter(s.lower())
	for letter in string.ascii_lowercase:
		if letter not in c:
			print('not pangram')
			sys.exit()
print('pangram')


line = input()
st = set()
for ch in line:
	if ord(ch.lower()) in range(ord('a'), ord('z') + 1):
		st.add(ch.lower())
if len(st) == 26:
	print('pangram')
else:
	print('not pangram')


n = list(input().lower())
check = list('qwertyuiopasdfghjklzxcvbnm')
for i in n:
	if i in check:
		check.remove(i)
if len(check) >= 1:
	print('not pangram')
else:
	print('pangram')


__author__ = 'nolanemirot'
alpha = ['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']
l = []

def isInArray(letter):
	i = 0
	while i < len(l):
		if l[i][0] == letter:
			l[i][1] += 1
			return True
		i += 1
	return False

def stringIsPangram():
	i = 0
	a = 0
	while i < len(l):
		j = 0
		while j < len(alpha):
			if l[i][0] == alpha[j]:
				a += 1
			j += 1
		i += 1
	if a == len(alpha):
		return True
	return False

def pangrams():
	inputString = input()
	i = 0
	inputString = inputString.lower()
	while i < len(inputString):
		if isInArray(inputString[i]) == False:
			if inputString[i] != ' ':
				l.append([inputString[i], 1])
		i += 1
	if stringIsPangram():
		print('pangram')
	else:
		print('not pangram')
pangrams()


print('pangram' if len(set(input().lower()).intersection('abcdefghijklmnopqrstuvwxyz')) == 26 else 'not pangram')


import string
potpan = input()
l = {x: False for x in string.ascii_lowercase}
for i in potpan:
	l[i.lower()] = True
if all(l.values()):
	print('pangram')
else:
	print('not pangram')


sentence = input()
letters = []
for letter in sentence:
	if letter.lower() not in letters:
		letters.append(letter.lower())
if len(letters) == 27:
	print('pangram')
else:
	print('not pangram')


import string
s = input().lower()
alphabet = {c for c in string.ascii_lowercase}
count = 26
for c in s:
	if c in alphabet:
		alphabet.discard(c)
		count -= 1
	if count == 0:
		break
if count == 0:
	print('pangram')
else:
	print('not pangram')


s = input()
l = []
s = s.lower()
for i in s:
	if ord(i) not in l:
		l.append(ord(i))
if len(l) == 27:
	print('pangram')
else:
	print('not pangram')


A = str(input())
B = [0 for i in range(256)]
for i in range(len(A)):
	B[ord(A[i])] = 1
	B[ord(A[i]) - 32] = 1
	B[ord(A[i]) + 32] = 1
for i in range(65, 91):
	if B[i] == 0:
		print('not pangram')
		break
	elif i >= 90:
		print('pangram')


import string
letters = set(string.ascii_lowercase)
line = input()
for char in line:
	letters.discard(char.lower())
if letters:
	print('not pangram')
else:
	print('pangram')


import string
sentence = [char.lower() for char in input()]
letters = [char.lower() for char in string.ascii_lowercase]
for char in sentence:
	if char in letters:
		letters.remove(char)
inverse = 'not ' if letters else ''
print(inverse + 'pangram')


s = 'pangram' if len(set([x if ord(x) >= 97 else chr(ord(x) + 32) for x in input() if x != ' '])) == 26 else 'not pangram'
print(s)


import re
import sys
sentence = input()
pattern = re.compile('\\s+')
sentence = re.sub(pattern, '', sentence.lower())
out = set(sentence)
if len(out) == 26:
	print('pangram')
else:
	print('not pangram')


class Panagram:

	def processLine(self, inputLine):
		numChars = len(inputLine)
		assert numChars >= 1
		assert numChars <= pow(10, 3)
		if numChars < 26:
			return 'not pangram'
		seenCharactersDict = dict()
		numberCharactersFound = 0
		for c in inputLine:
			assert isinstance(c, str)
			if not c.isalpha():
				continue
			c = c.lower()
			if c not in seenCharactersDict.keys():
				numberCharactersFound += 1
				seenCharactersDict[c] = True
			if numberCharactersFound > 25:
				return 'pangram'
		return 'not pangram'
p = Panagram()
input_line = input()
print(p.processLine(input_line))


s = input().lower()
import string
if all((l in s for l in string.ascii_lowercase)):
	print('pangram')
else:
	print('not pangram')


letters = 'abcdefghijklmnopqrstuvwxyz'
input_string = input().lower()
my_bool = False
for i in input_string:
	letters = letters.replace(i, '')
	if len(letters) == 0:
		print('pangram')
		my_bool = True
		break
if not my_bool:
	print('not pangram')


def isPangram(sample):
	sample = sample.lower()
	for c in 'qwertyuopasdfghjklizxcvbnm':
		try:
			sample.index(c)
		except ValueError:
			return False
	return True
sample = input()
print('pangram' if isPangram(sample) else 'not pangram')