403547: GYM101192 I Abacaba Ltd.
Description
Yasha is a young businessman who has read lots of marketing books. He decided to give his company a name that it will be the first in the alphabetical list of organizations of the city. But the city council is tired of all these endless "Abacaba Ltd."-s. So they gave Yasha a random string as the name for his company, in which he must do exactly one modification. Modification is done by swapping any two characters such that the distance between them is equal to any of the favorite numbers of the head of the city council. The distance is calculated as absolute difference of positions of characters in the string. It is guaranteed that such modification is possible.
InputThe first line contains string s — the initial random name. It consists of small latin letters. The second line contains one integer number n —the amount of the favorite numbers of the head of the city council. The next line has n integer numbers ai.
Output the name of the company that want to choose.
ExampleInputacdbeOutput
2
4 2
abdce