#C1684. Palindrome Game: Determine the Winner

    ID: 44916 Type: Default 1000ms 256MiB

Palindrome Game: Determine the Winner

Palindrome Game: Determine the Winner

You are given a non-empty string \( S \) consisting of lowercase alphabets. In the Palindrome Game, two players named John and Jane compete based on whether the given string is a palindrome. Specifically, if the string satisfies the condition \( S = S^R \) (where \( S^R \) denotes the reverse of \( S \)), then Jane wins; otherwise, John wins. Both players play optimally.

Your task is to implement a program that reads several test cases and for each one, determines the winner based on the above rule.

inputFormat

The input begins with an integer \( T \) representing the number of test cases. Each of the following \( T \) lines contains a non-empty string \( S \) consisting only of lowercase letters.

outputFormat

For each test case, output a single line containing either "Jane" if the string is a palindrome, or "John" otherwise.

## sample
2
abcba
abac
Jane

John

</p>