from collections import namedtuple import sys data = [] for line in sys.stdin: data.append(line.split()) # print(data) n = int(data[0][0]) m = int(data[0][1]) S = data[1][0] T = data[2][0] if n < m : print(-1) t,s = 0,0 while(t < m and s < n): if(T[t] == S[s]): t +...