Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- title = input()
- for _ in range(int(input())):
- temp_title = input()
- new_word = ''
- for i in title:
- if temp_title != '' and i == temp_title[0]:
- temp_title = temp_title[1:]
- else:
- new_word += i
- if temp_title == '':
- title = new_word
- print(title)
- else:
- print("No such title found!")
Advertisement
Add Comment
Please, Sign In to add comment