You are viewing a single comment's thread. Return to all comments →
n, m = map(int, input().strip().split(" ")) A = [] for _ in range(n): A.append( input().strip() ) for _ in range(m): str = input().strip() l = list( [index + 1 for index, value in enumerate(A) if value == str] ) print(-1) if len(l) == 0 else print(*l)
Seems like cookies are disabled on this browser, please enable them to open this website
DefaultDict Tutorial
You are viewing a single comment's thread. Return to all comments →