{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv align\u003d\"left\"\u003eProfessor Dr. Murzov decided to leave Burland. But before he leaves, he should return all his debts. Professor owes priest Popov P burcrystals, barber Parkin O burcrystals, student Studnev S burcrystals. Making payments using crystals is very simple - one small crystal equals to one burcrystal, one big crystal equals to two burcrystals. \u003cbr\u003eThe only problem is that there is no exact criteria to determine whether the crystal big or small. Because of this, Murzov asked all his creditors to estimate all his crystals and to say about each crystal is it big or small. Now professor has a big problem to solve - how to distribute his crystals to repay all his debts. Possibly somebody will get more then he owed, but it does not matter for professor, because he is not going to return to Burland, and crystals have no value in any other place. \u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cbr\u003e\u003cb\u003eInput\u003c/b\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003eThe first line contains integer numbers P, O and S (1 \u0026lt;\u003d P,O,S \u0026lt;\u003d 10^5). \u003cbr\u003eThe second line contains integer number N - the amount of crystals professor has (1 \u0026lt;\u003d N \u0026lt;\u003d 10^5). \u003cbr\u003eEach of the following N lines contains three letters without spaces. First letter means the estimate of this crystal by Popov, second - by Parkin, third - by Studnev. \u003cbr\u003eLetter \u0027B\u0027 means that the crystal is estimated as big, \u0027S\u0027 means that the crystal estimated as small. \u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cbr\u003e\u003cb\u003eOutput\u003c/b\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003eYou should output the distribution of crystals - N letters without any delimiters. \u003cbr\u003eLetter \u0027P\u0027 means that the crystal goes to Popov, \u0027O\u0027 - to Parkin, \u0027S\u0027 - to Studnev. If there is no such distributions of crystals that the debt is repaid, output only phrase \u0027no solution\u0027. \u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cbr\u003e\u003cb\u003eSample test(s)\u003c/b\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cbr\u003eInput\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cfont face\u003d\"Courier New\"\u003e\u003c/font\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cpre\u003e\u003c/pre\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e3 2 4 \u003cbr\u003e6 \u003cbr\u003eBBS \u003cbr\u003eSSB \u003cbr\u003eBBB \u003cbr\u003eBBS \u003cbr\u003eSSS \u003cbr\u003eBBS \u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cdiv align\u003d\"left\"\u003e\u003cdiv align\u003d\"left\"\u003e\u003cbr\u003eOutput\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cfont face\u003d\"Courier New\"\u003e\u003c/font\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cpre\u003e\u003c/pre\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003eOSPPSS \u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cdiv align\u003d\"left\"\u003e\u003cdiv align\u003d\"left\"\u003e\u003cbr\u003e\u003cb\u003eNote\u003c/b\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003ePopov will get 4 burcrystals, Parkin - 2, Studnev - 4. \u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cdiv align\u003d\"right\"\u003e \u003c/div\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003cdiv align\u003d\"right\"\u003e \u003c/div\u003e\u003c/div\u003e\u003cdiv align\u003d\"left\"\u003e\u003chr\u003e\u003c/div\u003e\u003ctable align\u003d\"left\" cellspacing\u003d\"7\"\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003eAuthor:\u003c/td\u003e\u003ctd\u003eAndrew V. Lazarev \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eResource:\u003c/td\u003e\u003ctd\u003eSaratov SU Contest: Golden Fall 2004 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eDate:\u003c/td\u003e\u003ctd\u003eOctober 2, 2004 \u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003c/div\u003e \u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\r\n\u003c/div\u003e"}}]}