ECOO TRYOUTS 1999

DEL Command

INPUT FILE: del.in
OUTPUT FILE: del.out

It is required to find out whether it is possible to delete certain files from an MS-DOS directory by executing the DEL command exactly once. There are no nested subdirectories.

A DEL command is used in MS-DOS to delete files from a directory and has the syntax DEL wcfilename

The parameter wcfilename can be just a file name (in MS-DOS a filename contains an prefix of up to eight letters and/or numbers, followed by a period, with an extension (suffix) of up to three letters and/or numbers) or can contain the wildcard characters '*' and '?'. Wherever a question mark appears it can match any one alphanumeric character, and wherever an asterisk appears it can match any sequence of alphanumeric characters, even the empty string (i.e. nothing). An asterisk can only appear at the end of a prefix or extension.

Filenames in this question will be composed entirely out of numbers and capital letters.

INPUT
Input consists of a directory listing - file names, one to a line, each preceded either by a "+" indicating that the file should NOT be deleted or a "-" indicating that the file must be deleted. The list contains between 1 and 1000 files and at least one file will be marked to be deleted.

OUTPUT
Output a single DEL command which will delete only the files marked with a "-".

Sample Input File

-BP.EXE
-BPC.EXE
+TURBO.EXE

Output for Sample Input (Other answers are possible)

DEL ?P*.*
Downloader failed! Response object 006~ASP 0159~Buffering Off~Buffering must be on.