Start: Jul, 17, 2019 00:00:00
20190717Python程序设计基础培训扩展练习
End: Jul, 21, 2019 00:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 45ms
Memory: 25312kB
Author: 13600624162
In contest: 1296

#这是答案

n,m= map(int,input().split())
d={}
for tcase in range(n):
    a=input().split()
    d[a[0]]=int(a[2])
for tcase in range(m):
    i=d[input()]
    if 90<=i<=100:
        print("A")
    elif 80<=i<90:
        print("B")
    elif 70<=i<80:
        print("C")
    elif 60<=i<70:
        print("OK")
    else:
        print("ARE YOU PIG?")