n | string = input() | n | str = input() |
| pattern = input() | | pattern = input() |
| result = -1 | | result = -1 |
n | for i in range(0, len(string) - len(pattern) + 1): | n | for i in range(0, len(str) - len(pattern) + 1): |
| correct = True | | matched = True |
| for j in range(0, len(pattern)): | | for j in range(0, len(pattern)): |
n | if pattern[j] != '@' and string[i + j] != pattern[j]: | n | if pattern[j] != '@' and str[i + j] != pattern[j]: |
| correct = False | | matched = False |
| break | | break |
t | if correct: | t | if matched: |
| result = i | | result = i |
| break | | break |
| print(result) | | print(result) |