PatternFind/Beka00
PatternFind/mvpwn
n1line = input()n1s = input()
2pattern = input()2p = input()
3b = pattern.split('@')3words = p.split('@')
4first_pat = line.find(b[0])4n1 = s.find(words[0])
5l = len(b[0])5l = len(words[0])
6if l == 0:6if l == 0:
7    l += 17    l += 1
n8while first_pat != -1:n8while n1 != -1:
9    flag = True9    flag = True
n10    second_pat = first_patn10    n2 = n1
11    for i in range(1, len(b)):11    for i in range(1, len(words)):
12        if b[i] == line[second_pat + len(b[i - 1]) + 1:second_pat + len(b[i - 1]) + 1 + len(b[i])]:12        if words[i] == s[n2 + len(words[i - 1]) + 1:n2 + len(words[i - 1]) + 1 + len(words[i])]:
13            second_pat = second_pat + len(b[i - 1]) + 113            n2 = n2 + len(words[i - 1]) + 1
14        else:14        else:
n15            first_pat = line.find(b[0], first_pat + l)n15            n1 = s.find(words[0], n1 + l)
16            flag = False16            flag = False
17            break17            break
18    if flag:18    if flag:
19        break19        break
t20print(first_pat)t20print(n1)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op