|
|||
Blood groupAlthough mathematics and informatics are very beautiful and interesting, it is also important to remember the importance of other sciences as well. Thus in this exercise we need to "flex" our biology knowledge. To produce a human offspring we need two parents. The children inherits half of the gene pool from each parent- Out of every potential properties now we are interested in the blood groups. More precisely we have the following knowledge:
InputThe input is one single line which contains three units separated by a single space character. Each unit is either the ? character or has the structure {A,B,AB,O}{+,-} (for example AB-, A+, O-, etc.). Out of the three units exactly one of them is the ? character. The first unit is the blood group of the first parent, the second unit is the blood group of the second parent and the last unit is the blood group of their child. OutputThe output is a single line which describes what unit(s) can be substituted in place of the ? symbol. The possible units has the same structure as in the input: {A,B,AB,O}{+,-}. If there are multiple answers then there must be exactly one space character between the units and the letters in the units should be in lexicographic order (help: A -> AB -> B -> O), the "plus" and "minus" signs should follow each other in this order (so e.g. A+ is before A-, but A- is before AB+). If it is impossible to substitute anything in place of the ? character then output the X character. ExampleExplanation
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |