Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- pres = (input().rstrip()).split(" ")
- while "" in pres:
- del pres[pres.index("")]
- indices = set()
- for line in sys.stdin:
- words = line.rstrip().split(" ")
- while "" in words:
- del words[words.index("")]
- for i in range(len(words)):
- for j in pres:
- if j == words[i]:
- indices.add(i+1)
- for i in sorted(indices):
- print(i, end = " "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement