Author: | A. Baranov | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 256 Mb | |
Output file: | Standard output |
Four strings of the same length are composed of four characters ('A', 'B', 'C' and 'D').
Your program must find such a string that Hamming distance from it to any strings of original set is the same.
Moreover, such string must have the same length as the original strings.
If there are many answers, select any string that gives the minimum of distance.
Input data contains four original strings.
Output data must contain answer or empty string, if answer does not exist.
Length of original strings is from 1 to 32.
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|