is very bad at spelling. This is a big problem when he is writing pieces of text on paper. Because he has horrible handwriting and a sub par eraser, whenever makes a typo the correction is often smudged and unreadable. Make a program to correct the typos for him.
Input Specification
The first line of input contains the text to be corrected. It can contain any ASCII characters and will be no longer then the length of the script for The Bee Movie.
The next line contains representing the number of typos in the text.
The next lines each represent a typo. There will be 2 space separated values. The first one represents the index at which the typo occurred where the first index of the text is at 0. The second value is the character that should go in place of the character originally at the index.
Output Specification
Output the final text after correcting all typos.
Sample Input
A rase by any otwer name would smeli as sweet.
3
3 o
16 h
35 l
Sample Output
A rose by any other name would smell as sweet.
Comments