Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def tr(x):
- if x == 'write':
- return 'W'
- if x == 'read':
- return 'R'
- if x == 'execute':
- return 'X'
- N1 = int(input())
- A = {}
- S = []
- for i in range(N1):
- key, *val = input().split()
- A[key] = val
- N2 = int(input())
- for i in range(N2):
- v, k = input().split()
- if tr(v) in A[k]:
- S.append('OK')
- else: S.append('Access denied')
- for i in S:
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement