Decode the messages
All submissions for this problem are available.
Alice wanted to pass Bob some secret messages. So they used an encoding technique using which a set of strings is encoded to ((a,b)o(m,n)p,b) The actual messages being aomp aonp bomp bonp b Help bob decode the message
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- Each test case contains a single string a denoting the encoded message
- For each test case, output a list of strings containing the decoded messages each message in a line.
- 1 ≤ T ≤ 10000
- 1 ≤ |a| ≤ 1000
Input: 1 ((a,b)o(m,n)p,b) Output: aomp aonp bomp bonp b
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PYP3|
Fetching successful submissions
If you are still having problems, see a sample solution here.