#K94852. String Transformation Based on Palindrome Check
String Transformation Based on Palindrome Check
String Transformation Based on Palindrome Check
Given a string \(S\), transform it according to the following rule:
- If \(S\) is a palindrome (ignoring case), output the reverse of \(S\).
- Otherwise, output \(S\) converted to uppercase.
A palindrome is defined as a string that reads the same forwards and backwards once it is converted to lowercase, i.e., \(S = S^{rev}\). For instance, "Radar" is a palindrome because \(\text{radar} = \text{radar}^{rev}\).
inputFormat
The input consists of a single line containing the string \(S\). The string contains only alphabetic characters.
outputFormat
Output the transformed string. If \(S\) is a palindrome (ignoring case), output the reverse of \(S\); otherwise, output \(S\) in uppercase.
## sampleRadar
radaR