The IOI has decided to change its format! Now, it will be composed of T
s and F
s. The score of a member is the number of correct answers minus the number of wrong answers (no blanks are allowed). The score of a team is the sum of the squares of the members' scores.
For example, if TFFTF
, TTFTT
, FTTTF
, and TFFFF
, and the answer key was TTTTT
, then the members' scores would be
The contestants have not yet been marked as you have stolen the answer key! You plan to adjust the answer key. What answer key will maximize Team Canada's score?
If there are multiple valid answer keys, any of them will be accepted.
Constraints
Input Specification
The first line of input will contain a single integer
The next four lines of input will each contain a string of length T
s and F
s representing the answers of each of Team Canada's members.
Output Specification
Output a single string of length T
s and F
s. This string should represent an answer key which maximizes Team Canada's score.
Sample Input 1
5
TFFTF
TTFTT
FTTTF
TFFFF
Sample Output 1
TFFFF
Sample Input 2
8
TTTTTTTT
TTTTTTTT
TTTTTTTT
FFFFFFFF
Sample Output 2
FFFFFFFF
Comments