SP409 DELCOMM - DEL Command
Description
It is required to find out whether it is possible to delete given files from MS-DOS directory executing the DEL command of MS-DOS operation system only once. There are no nested subdirectories.
Input Format
The first line of the input is an integer M, then a blank line followed by M datasets. There is a blank line between datasets.
Input data for each dataset contains a list of full file names without empty lines and spaces. Each name is written in a separate line of input data file and preceded with a control sign: '-' for delete or '+' for keep. Full file names are not repeated. The list comprises at least one file, and at least one file is marked to be deleted. There are no more than 1000 files.
Output Format
For each dataset, write to the first line of output the required DEL command (only one proposal) or IMPOSSIBLE if there is no solution. A space should separate "DEL" from wildcard. **Print a blank line between datasets.**