Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input()
- word = input().replace('?', '#').replace('*', '#')
- i = word.index('X')
- if word[-1] == '.':
- if set(word[i + 1:]) == {'.'}:
- if word[:i].find('.') < word[:i].rfind('#'):
- print('YES')
- else:
- print('NO')
- else:
- if '#' in word[i + 1:]:
- print('YES')
- else:
- print('NO')
- else:
- print('NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement