Marriage dilemma

0

0 votes
Easy
Problem

King Ritish( born in 250AD ) didn't like palindromes, so he started a new rule that a boy can't marry a girl whose name when concatenated with the boy's name make a palindrome.
A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward, such as madam or racecar.
Every name will be a string consisting of lowercase characters.
Input:
Given t test cases , each consists of 2 names : boy's name and girl's name. Length of a string < 50.
Output:
Print "Have kids !" without quotes if they could marry else print -1.

Sample Input
3
mukesh champa
ritish hsitir
jaggu maggu
Sample Output
Have kids !
-1
Have kids !
Time Limit: 5
Memory Limit: 256
Source Limit:
Contributers:
Editor Image

?