Justin walks into an interview, and his interviewer asks him to take a seat at an interesting table.
The table has seats on each side of the table, so people can sit across from one another. Some seats are already occupied by people, and so no one can sit there.
Help Thomas figure out whether it is possible for him and his interviewer to sit across from one another at the table!
Input Specification
The first line contains an integer , which is the number of people that can be seated on one side of the table.
The next two lines each contain a string of characters, representing each side of the
table. Each character is either X
or O
, signifying whether the seat is occupied or free
respectively.
Output Specification
Output :)
if Thomas and his interviewer can sit across from one another, or :(
if they can't.
Sample Input 1
4
XOXO
OXOO
Sample Output 1
:)
Explanation for Sample 1
There is a pair of empty seats facing each other at the very end of the table.
Sample Input 2
4
XXOX
OOXO
Sample Output 2
:(
Explanation for Sample Input 2
No matter how Thomas chooses their seats, they can't sit across from one another.
Comments