{"problem":{"name":"Remaining Balls","description":{"content":"We have $A$ balls with the string $S$ written on each of them and $B$ balls with the string $T$ written on each of them.   From these balls, Takahashi chooses one with the string $U$ written on it and","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc154_a"},"statements":[{"statement_type":"Markdown","content":"We have $A$ balls with the string $S$ written on each of them and $B$ balls with the string $T$ written on each of them.  \nFrom these balls, Takahashi chooses one with the string $U$ written on it and throws it away.  \nFind the number of balls with the string $S$ and balls with the string $T$ that we have now.\n\n## Constraints\n\n*   $S$, $T$, and $U$ are strings consisting of lowercase English letters.\n*   The lengths of $S$ and $T$ are each between $1$ and $10$ (inclusive).\n*   $S \\not= T$\n*   $S=U$ or $T=U$.\n*   $1 \\leq A,B \\leq 10$\n*   $A$ and $B$ are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$ $T$\n$A$ $B$\n$U$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc154_a","tags":[],"sample_group":[["red blue\n3 4\nred","2 4\n\nTakahashi chose a ball with `red` written on it and threw it away. Now we have two balls with the string $S$ and four balls with the string $T$."],["red blue\n5 5\nblue","5 4\n\nTakahashi chose a ball with `blue` written on it and threw it away. Now we have five balls with the string $S$ and four balls with the string $T$."]],"created_at":"2026-03-03 11:01:13"}}