nym py

Run Settings
LanguagePython
Language Version
Run Command
n , m = list(map(int,input().split(" "))) a = [] b = [] for i in range(n): a.append(input()) for i in range(m): b.append(input()) for i in b: c = a.count(i) if c == 0: print("-1") continue for n,j in enumerate(a): if i == j : print(n+1,end=" ") print()
Editor Settings
Theme
Key bindings
Full width
Lines