Problem:


Score : 100 points

Problem Statement

You are given a string S of length 2 or 3 consisting of lowercase English letters. If the length of the string is 2, print it as is; if the length is 3, print the string after reversing it.

Constraints

The length of S is 2 or 3.

S consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If the length of S is 2, print S as is; if the length is 3, print S after reversing it.

Sample Input 1

abc

Sample Output 1

cba

As the length of S is 3, we print it after reversing it.

Sample Input 2

ac

Sample Output 2

ac

As the length of S is 2, we print it as is.



Sample input:
abc


Sample output:
cba

Submission status: Accepted

Solution code:
# coding: utf-8

# 入力
indata = input()

# データ長
length = len(indata)

if length == 2:
    print(indata)
else:
    print(indata[::-1])

Submission status: Accepted

Solution code:
s = str(input())
if len(s) == 2:
    res = s
else:
    res = s[::-1]
print(res)

Submission status: Accepted

Solution code:
S = input()
if(len(S)==2):
    print(S)
else:
    print(S[-1::-1])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# 入力値受け取り
S = input()

if len(S) == 3:
    S = S[::-1]

# 結果出力
print("{}".format(S))

Submission status: Accepted

Solution code:
S = input()
if len(S) ==2:
  print(S)
else:
  x =S[::-1]
  print(x)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()

if len(s)==2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
s = input()
len_s = len(s)
if  len_s is 2:
    print(s)
elif len(s) is 3:
    s = s[::-1]
    print(s)
exit()

Submission status: Accepted

Solution code:
a = input()

if len(a) == 3:
    new_str = ''.join(list(reversed(a)))
    print(new_str)
else:
    print(a)

Submission status: Accepted

Solution code:
letter = str(input())
if len(letter) == 2:
    print(letter)
else:
    print(letter[::-1])

Submission status: Accepted

Solution code:
S = input().strip()
if len(S) == 2:
  print(S)
else:
  print(S[2]+S[1]+S[0])

Submission status: Accepted

Solution code:
a = input()
if len(a) == 3:
    print(a[2]+a[1]+a[0])
else:
    print(a)

Submission status: Accepted

Solution code:
N= input()
nlen=len(N)
if nlen==3:
    CN=N[2]+N[1]+N[0]
    print (CN)
else:
    print (N)

Submission status: Accepted

Solution code:
strn = input()
if len(strn) == 3:
    print(strn[::-1])
else:
    print(strn)

Submission status: Accepted

Solution code:
num = input()
if len(num) == 2:
    print(num)
elif len(num) == 3:
    print(num[::-1])

Submission status: Accepted

Solution code:
s=input()
if len(s)==2:
  print(s)
else:
  print(s[: : -1])

Submission status: Accepted

Solution code:
s=input()
if len(s)==2:
    print(s)
else:
    print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
s = input()
print(s if len(s) == 2 else s[2] + s[1] + s[0])

Submission status: Accepted

Solution code:
s = input()
s_len = len(s)

if s_len == 2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
S=list(input())
if(len(S)==2):
    print(S[0]+S[1])
else:
    print(S[2]+S[1]+S[0])

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
  print(s)
else:
  print(s[::-1])

Submission status: Accepted

Solution code:
I=input()
if len(I)==2:
    print(I)
else:
    print(I[2]+I[1]+I[0])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:
    print(S)
elif len(S) == 3:
    #str_list = list(reversed(S))
    new_str = ''.join(list(reversed(S)))
    print(new_str)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created: 土 10/27 21:02:12 2018

# Usage
#
"""
def main():
    IN = input()

    if len(IN) == 2:
        print(IN)

    if len(IN) == 3:
        print(''.join(reversed(IN)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()
if len(S) == 3:
  print(S[::-1])
else:
  print(S)

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
    print(s)

elif len(s) == 3:
    print(s[2] + s[1] + s[0])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:
  print(S)
else:
  result = []
  listS = list(S)
  for i in range(3):
    result.append(listS[2 - i])
  print(''.join(result))

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
        print(s)
elif len(s) == 3:
        print(s[::-1])

Submission status: Accepted

Solution code:
n = input()
b = len(n)
if b == 2:
    print(n)
else:
    print(n[2]+n[1]+n[0])

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8:


def main():
    S = raw_input()
    if len(S) == 2:
        print(S)
    else:
        print(S[::-1])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S=input()
print(S[::-1]if len(S)==3 else S)

Submission status: Accepted

Solution code:
s = input()
if(len(s)==2):
    print(s)
else:
    s=s[::-1]
    print(s)

Submission status: Accepted

Solution code:
s = str(input())
if len(list(s)) == 3:
  print(str(s)[::-1])
else:
  print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 文字列の入力
s = input()
# 出力
if len(s) == 2:
  print(s)
else:
  print(s[::-1])

Submission status: Accepted

Solution code:
s=input().strip()
if len(s)==2:
    print(s)
elif len(s)==3:
    print(s[-1::-1])

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
    print(S)
elif len(S) == 3:
    print(S[::-1])

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)
else:
    t = s[2] + s[1] + s[0]
    print(t)

Submission status: Accepted

Solution code:
s=list(input())
if len(s)==2:print(''.join(s))
else:
  s.reverse()
  print(''.join(s))

Submission status: Accepted

Solution code:
s=input()

if len(s)==2:
    print(s)
else:
    for i in [2,1,0]:
        print(s[i], end="")
    print("")

Submission status: Accepted

Solution code:
S = input()
if len(S)==2:
    print(S)
else:
    print(S[-1::-1])

Submission status: Accepted

Solution code:
# coding:utf-8

s = str(input())

if len(s)==3:
    s = s[::-1]
print(s)

Submission status: Accepted

Solution code:
S = input()
if len(S) == 3:
    S = S[::-1] # 文字列反転
print(S)

Submission status: Accepted

Solution code:
S = input()
if len(S)==2:
    print(S)
else:
    print(S[::-1])

Submission status: Accepted

Solution code:
S = input()
if len(S) == 3: S = S[::-1]
print(S)

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)
else:
    a = ""
    a += s[2]
    a += s[1]
    a += s[0]
    print(a)

Submission status: Accepted

Solution code:
import math

def gcd(a,b):
    """Compute the greatest common divisor of a and b"""
    while b > 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b / gcd(a, b)

a = input()
if(len(a)==2):
   print(a)
else:
   print(a[::-1])

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
 print(S)
else:
 print(S[::-1])

Submission status: Accepted

Solution code:
s = input()

if len(s)==2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)
else:
    for i in range(2,-1,-1):
        print(s[i],end = '')
    print('')

Submission status: Accepted

Solution code:
s = input()
if len(s) == 3:
  for i in reversed(s):
    print(i, end="")
else:
  print(s)

Submission status: Accepted

Solution code:
s = input()
print(s if len(s) == 2 else "".join(list(reversed(s))))

Submission status: Accepted

Solution code:
s=input()
if len(s)==2:
	print(s)
else:
	print(s[::-1])

Submission status: Accepted

Solution code:
#coding:utf-8

S = input()

if len(S) == 3:
    print(S[::-1])
else:
    print(S)

Submission status: Accepted

Solution code:
a = list(input())

if len(a) == 2:
    a = "".join(a)
    print(a)
else:
    a.reverse()
    a = "".join(a)
    print(a)

Submission status: Accepted

Solution code:
a = input()
n = len(a)

if n == 2:
    ans = a
else:
    ans = a[::-1]

print(ans)

Submission status: Accepted

Solution code:
def main():
    s = str(input())
    if(len(s) == 3):
        s = s[::-1]
    print(s)

main()

Submission status: Accepted

Solution code:
l=input()
if len(l)==2:
    print(l)
else:
    print(l[::-1])

Submission status: Accepted

Solution code:
s = input()

if(len(s)==2):
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S)==2:
    print(S)
else:
    print(((S[::-1])))

Submission status: Accepted

Solution code:
s = input()
if len(s)==2:
    print(s)
else:
    r = s[2]+s[1]+s[0]
    print(r)

Submission status: Accepted

Solution code:

def main():
    s = input()
    if len(s) == 2:
        print(s)
    else:
        print(s[::-1])
    pass

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
str = raw_input()

if len(str) == 2:
    print(str)
elif len(str) == 3:
    print(str[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:
  print(S)
else:
  print(S[2] + S[1] + S[0])

Submission status: Accepted

Solution code:
# 一つの文字列の入力
s = str(input())

if len(s) == 2:
    print(s)
else:
    print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
s=str(input())
if(len(s)==2):
    print(s)
else:
    print(s[::-1])
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Accepted

Solution code:
s = input()

if(len(s) == 2):
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
# Measure

S = input()

if len(S) == 2:
    print(S)

else:
    print('{}{}{}'.format(S[2], S[1], S[0]))

Submission status: Accepted

Solution code:
n = input()

if len(n) == 2:
    print(n)
elif len(n) == 3:
    print(n[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 3:
    print(S[::-1])
else:
    print(S)

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
    print(S)
else:
    print(S[2]+S[1]+S[0])

Submission status: Accepted

Solution code:
S = raw_input()

if len(S) == 2:
	print S
elif len(S) == 3:
	print "".join([i for i in reversed(S)])

Submission status: Accepted

Solution code:
s=input()
l=len(s)
if(l==2):
    print(s)
else:
    print("".join(reversed(s)))

Submission status: Accepted

Solution code:
a=input()
if len(a)==2:
    print(a)
else:
    print(a[::-1])

Submission status: Accepted

Solution code:
s = input()
ss = list(s)
if len(ss) == 2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
S = list(input())

if len(S) == 3:
    S.reverse()
print("".join(S))

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
  print(s)
else:
  print(s[2] + s[1] + s[0])

Submission status: Accepted

Solution code:
a = input()

if len(a) == 3:
    print(a[::-1])
else:
    print(a)

Submission status: Accepted

Solution code:
s=input()
if (len(s) == 2):
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
s = input()
if len(s)==2:print(s)
else:
    print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
S = input().strip()

if len(S) == 3:
  print(S[::-1])
else:
  print(S)

Submission status: Accepted

Solution code:
S=input()

if len(S)==3: print(S[2]+S[1]+S[0])
else: print(S)

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:

    print(S)

elif len(S) == 3:

    print(S[::-1])

Submission status: Accepted

Solution code:
s = str(input())
if len(s) == 2:
 print(s)
elif len(s) == 3:
 a = s[2] + s[1] + s[0]
 print(a)

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
    print(S)
else:
    S = S[::-1]
    print(S)

Submission status: Accepted

Solution code:
n=input()
if len(n)==2:
    print(n)
else:
    print(n[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:
    ans = S
else:
    ans = S[::-1]

print(ans)

Submission status: Accepted

Solution code:
def main():
    string = input()
    if len(string) == 2:
        print(string)
    else:
        print(''.join(reversed(string)))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

def main():
    n = input()

    if len(n) == 2:
        print(n)
    else:
        print(n[::-1])


if __name__ == "__main__":
        main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = list(input())

if len(S) == 2:
    print("".join(S))
else:
    S.reverse()
    print("".join(S))

Submission status: Accepted

Solution code:
S=input()
if len(S)==2:
    print(S)
    exit(0)
elif len(S)==3:
    for i in range(len(S)):
        print(S[len(S)-1-i], end='')

Submission status: Accepted

Solution code:
N =  input()
if len(N) == 2:
    print(N)
else:
    print(N[2] + N[1] + N[0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = input()

if len(S) == 3:
    print(S[::-1])
else:
    print(S)

Submission status: Accepted

Solution code:
S = input()

if len(S) <= 2:
    print(S)
else:
    print(S[::-1])

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
    print(s)
else:
    print("".join(list(reversed(s))))

Submission status: Accepted

Solution code:
s=input();print(s[::-1] if len(s)-2 else s)

Submission status: Accepted

Solution code:
N=list(input())
length=len(N)
if length==2:
  print("".join(N))
else:
  N.reverse()
  print("".join(N))

Submission status: Accepted

Solution code:
s = input()
length = len(s)
if length == 2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
def main():
    S= input()

    if len(S) == 2:
        print(S)
    else:
        print(S[::-1])
    return


main()

Submission status: Accepted

Solution code:
inp = input()
if len(inp) == 3:
    print(inp[::-1])
else:
    print(inp)

Submission status: Accepted

Solution code:
S = str(input())
# a = list(map(int, input().split()))

if len(S) == 2:
    print(S)
else:
    print(S[::-1])

Submission status: Accepted

Solution code:
def tpbc_2018_a():
    s = input()
    if len(s) == 2:
        return s
    else:
        return s[::-1]


print(tpbc_2018_a())

Submission status: Accepted

Solution code:
s=input()
if len(s)==2:
    print(s)
else:
    for i in range(len(s)-1, -1, -1):
        print(s[i], end="")

Submission status: Accepted

Solution code:
a = list(input())
if len(a) == 2:
    print("".join(a))
else:
    b = [a[2],a[1],a[0]]
    print("".join(b))

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)
else:
    t = ''
    for i in range(1, len(s) + 1):
        t += s[(-1) * i]
    print(t)

Submission status: Accepted

Solution code:
from sys import stdin

# a = [int(i) for i in stdin.readline().rstrip().split()]

S = stdin.readline().rstrip()
if len(S) == 2:
    print(S)
else:
    ans = S[2] + S[1] + S[0]
    print(ans)

Submission status: Accepted

Solution code:
s = input()
if(len(s) == 2):
  print(s)
else:
  print(s[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:
    print(S)
elif len(S) == 3:
    print(S[::-1])

Submission status: Accepted

Solution code:
def main():
    S = input()
    if (len(S)==2):
        return S
    else:
        return S[::-1]

if __name__ == "__main__":
    print(main())

Submission status: Accepted

Solution code:
s = str(input())

if len(s)==2:
    print(s)
elif len(s)==3:
    print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
n=input()
n2=""
if len(n)==2:
    print(n)
else:
    for i in range(3):
        n2=n2+n[2-i]
    print(n2)

Submission status: Accepted

Solution code:
S=raw_input()
if len(S)==2:
	print S
else:
	print S[::-1]

Submission status: Accepted

Solution code:
S = list(input())
if len(S) == 3:
    S = S[::-1]
print(''.join(S))

Submission status: Accepted

Solution code:
S = list(input())

if len(S) == 2:
    print(''.join(S))
else:
    S.reverse()
    print(''.join(S))

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
    print(s)
else:
    print("{}{}{}".format(s[2], s[1], s[0]))

Submission status: Accepted

Solution code:
from sys import stdin


def main() -> None:
    s = next_str()

    if len(s) == 2:
        print(s)
    else:
        print("".join(reversed(s)))


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

s = input()
if len(s) ==2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S) > 2:
    print(S[::-1])
else:
    print(S)

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
    print(s)
elif len(s) == 3:
    print(s[::-1])

Submission status: Accepted

Solution code:
# cook your dish here
s=list(input())
ass = ''
if len(s) == 2:
    ass = s[0]+s[1]
else:
    ass = s[2]+s[1]+s[0]
print(ass)

Submission status: Accepted

Solution code:
S=input()
if len(S)==2: print(S)
else:
    for s in S[::-1]:
        print(s,end='')
    print('')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = input()

if(len(S) == 2):
    print(S)
else:
    print(S[2] + S[1] + S[0])

Submission status: Accepted

Solution code:
s = input().strip('\n')
if len(s)==3:
    print(s[::-1])
else:
    print(s)

Submission status: Accepted

Solution code:
s=input()
if len(s)==2:
    print(s)
else:
    print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
N = input()
a = N.split()
if len(N) == 2:
    print(N)
else:
    print(N[2]+N[1]+N[0])

Submission status: Accepted

Solution code:
sS = input().rstrip()
if len(sS) == 2:
    print(sS)
else :
    print(sS[::-1])

Submission status: Accepted

Solution code:
s = input()
print(s[2]+s[1]+s[0]) if len(s) == 3 else print(s)

Submission status: Accepted

Solution code:
s = str(input())
if len(s) == 2:
    print(s)
else:
    sl = list(s)
    sl.reverse()
    print("".join(sl))

Submission status: Accepted

Solution code:
S = input()

if len(S)==2:
    print(S)
else:
    print(S[2]+S[1]+S[0])

Submission status: Accepted

Solution code:
s = input()
print([s,s[-1::-1]][len(s) == 3])

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)
if len(s) == 3:
    print(s[2] + s[1] + s[0])

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
    print(S)
elif len(S) == 3:
    print("".join(S[::-1]))

Submission status: Accepted

Solution code:
S = input()

if len(S) == 3:
    print(S[-1] + S[-2] + S[-3])
else:
    print(S)

Submission status: Accepted

Solution code:
s = input()
if len(s)== 2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S()
if len(s) == 2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
str1 = raw_input().replace("\n", "")

if len(str1) == 2:
    print str1
else:
    print str1[::-1]

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
	print(s)
else:
	s = s[::-1]
	print(s)

Submission status: Accepted

Solution code:
s=input()
if len(s)==2:
    print(s)
else:
    s=list(s)
    s.reverse()
    print(''.join(s))

Submission status: Accepted

Solution code:
N=input()
if len(N)==2:
    print(N)
    exit()
else:
    print(N[2]+N[1]+N[0])
    exit()

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
    print(S)
else:
    print(S[-1::-1])

Submission status: Accepted

Solution code:
s = input()
if len(s)==2:
 print(s)
else:
 print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
s = input()
if len(s) ==2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
S = input()

if len(S) == 2:
    print(S)
else:
    print(S[2]+S[1]+S[0])

Submission status: Accepted

Solution code:
s = list(input())
if len(s) == 2:
    print(''.join(s))
elif len(s) == 3:
    print(''.join(s[::-1]))

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
  print(S)
elif len(S) == 3:
  print(S[::-1])

Submission status: Accepted

Solution code:
# encoding: utf-8
# N = int(input())
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# AB = [list(map(int, input().split())) for i in range(N)]

S = input()

if len(S) == 2: print(S)
else: print(S[::-1])

Submission status: Accepted

Solution code:
S=input()
if len(S)==3:
    print(S[::-1])
else:
    print(S)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

S = raw_input()

print S if len(S) == 2 else S[::-1]

Submission status: Accepted

Solution code:
N = input()

if len(N) == 2:
    print(N)
else:
    print(N[-1]+N[-2]+N[-3])

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2: print(s)
else: print(s[::-1])

Submission status: Accepted

Solution code:
listS= list(input())
if len(listS)==2:
    print("".join(listS))
else:
    listS.reverse()
    print("".join(listS))

Submission status: Accepted

Solution code:
n = input()
if len(n) == 2:
    print(n)
else:
    print(n[::-1])

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    S = input()

    if len(S) > 2:
        print(S[::-1])
    else:
        print(S)

input = lambda: stdin.readline().rstrip()
main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
s=input()
if len(s)==2:
  print(s)
else:
  print(s[2]+s[1]+s[0])

Submission status: Accepted

Solution code:
s = input()

if len(s) == 2:
    print(s)

if len(s) == 3:
    print(s[::-1])

Submission status: Accepted

Solution code:
S = list(input())
if len(S) == 2 :
    print("".join(S))
else :
    S = list(reversed(S))
    print("".join(S))

Submission status: Accepted

Solution code:
def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))

s = input()

if len(s) == 2:
    print(s)

if len(s) == 3:
    print(s[::-1])

Submission status: Accepted

Solution code:
l = input()
if len(l) == 2:
    print(l)
else:
    print(l[::-1])

Submission status: Accepted

Solution code:
s=input()
if(len(s)<3):print(s)
else:print(s[::-1])

Submission status: Accepted

Solution code:
s = input()
if(len(s) == 2):
    print(s)
else:
    print(s[2] + s[1] + s[0])

Submission status: Accepted

Solution code:
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

s = input()
if len(s) == 2:
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
n = input()
if len(n) == 2:
    print(n)
else:
    print(n[2]+n[1]+n[0])

Submission status: Accepted

Solution code:
s=input()
if(len(s)==2):
    print(s)
else:
    print(s[::-1])

Submission status: Accepted

Solution code:
l = input()
if len(l) ==3:
  print(l[::-1])
else:
  print(l)

Submission status: Accepted

Solution code:

def t118A():
    S = input()
    if len(S) == 2:
        print(S)
    else:
        print(S[::-1])
t118A()

Submission status: Accepted

Solution code:
a = input()
if len(a) == 2:
	print(a)
else:
	print(a[::-1])

Submission status: Runtime Error

Solution code:
S = input()
buffer = 0
if len(S) != 2:
  buffer = S[0]
  S[0] = S[2]
  S[2] = buffer
print(S)

Submission status: Runtime Error

Solution code:
s=input()

if len(s)==2:
  print(s)
if len(s)==3:
  s.reverse()
  print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
if len(n)==2:
    print(n)
else:
    print(n[::-1])

Submission status: Runtime Error

Solution code:
N = int(input())
k = 1
n = 0
while n < N:
    n += k
    k += 1
if n!=N:
    print('No')
    exit()
print('Yes')
print(k)
ans = [[] for _ in range(k)]
v = 1
for i in range(k-1):
    for j in range(i+1,k):
        ans[i].append(v)
        ans[j].append(v)
        v += 1
for row in ans:
    print(len(row),*row)

Submission status: Runtime Error

Solution code:
S=str(input())
if len(S)==2:
    print(S)
else:
    print(S.reverse())

Submission status: Runtime Error

Solution code:
if len(S) == 2:
  print(S)
if len(S) == 3:
  print(S[2]+S[1]+S[0])

Submission status: Runtime Error

Solution code:
n = input()
print(n.reverse() if len(n) == 3 else n)

Submission status: Runtime Error

Solution code:
s = input()
if len(S) == 2:
  print(s)
else:
  print(s[2]+s[1]+s[0])

Submission status: Runtime Error

Solution code:
s = input()
if len(s) == 3:
  s.reverse()
print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
l = []
for _ in range(n):
    a = int(input())
    l.append(a)

l.sort()
ans = []
mid = 0

if len(l)%2 == 0:
    mid = len(l)//2-1
else:
    mid = len(l)//2


f = l[mid]
ans.append(f)
l_l = l[0:mid]
l_r = l[mid+1:n+1]
l_r.reverse()


if len(l_l) == len(l_r) and len(l_l) != 1:
    for i in range(len(l_r)):
        ans.append(l_r[i])
        ans.append(l_l[i])
elif len(l_l) == len(l_r) and len(l_l) == 1:
    ans.append(l_l[0])
    ans.append(l_r[0])
else:
    for i in range(len(l_r)):
        if i+1 == len(l_r):
            ans.append(l_r[i])
        else:
            ans.append(l_r[i])
            ans.append(l_l[i])


cnt = []

for j in range(len(ans)-1):
    cnt.append(abs(ans[j+1]-ans[j]))


print(sum(cnt))

Submission status: Runtime Error

Solution code:
s = input()
print(s if len(s)==2 else s[::-1]

Submission status: Runtime Error

Solution code:
def resolve():
    a,b,k=map(int, input().split())
    turn=0
    for i in range(k):
        if turn==0:
            if a%2!=0:
                a-=1
            b+=a//2
            a=a//2
            turn=1
        else:
            if b%2!=0:
                b-=1
            a+=b//2
            b=b//2
            turn=0
    print(a,b)
resolve()

Submission status: Runtime Error

Solution code:
s=input()
if (len(s)==3):
	s=reverse(s)
print(s)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
if N & 1:
    ans1 = 2*sum(A[N//2:])-A[N//2]-A[N//2+1]-2*sum(A[:N//2])
    ans2 = 2*sum(A[N//2+1:])-2*sum(A[:N//2+1])+A[N//2]+A[N//2-1]
else:
    if N == 2:
        ans1 = ans2 = abs(A[0]-A[1])
    else:
        ans1 = 2*sum(A[N//2:])-A[N//2]-2*sum(A[:N//2])+A[N//2-1]
        ans2 = 2*sum(A[N//2+1:])-A[N//2+1]-2*sum(A[:N//2+1])+A[N//2]
print(max(ans1, ans2))

Submission status: Runtime Error

Solution code:
s = input()

if len(s) == 2:
  print(s)
else:
  print("".join(list(reverse(s))))

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(10**3):
    if n == i*(i+1)//2:
        x = i
        break
else:
    print("No")
    exit()
ans = [[] for i in range(x+1)]
app = 0
for i in range(1,x+1):
    for j in range(i):
        app += 1
        ans[j].append(app)
    ans[i].extend([k for k in range(i*(i-1)//2+1,i*(i+1)//2+1)])
print("Yes")
print(x+1)
for ansarr in ans:
    print(x, *ansarr, sep = " ")

Submission status: Runtime Error

Solution code:
#coding:utf-8
a, b, k = map(int, input().split())

for i in range(0, k):
    if i % 2 == 0:
        b += a / 2
        a /= 2
    else:
        a += b / 2
        b /= 2

print(a, b)

Submission status: Runtime Error

Solution code:
s=input();print(s[::-(len(s)==3)])

Submission status: Runtime Error

Solution code:
S = str(input())

if len(S) == 2:
    print(S)
    
else:
    print(''.join(A))

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
for i in range(k):
    if i%2==0:
        b+=a//2
        a=a//2
    if i%2!=0:
        a+=b//2
        b=b//2
print(a,b)

Submission status: Runtime Error

Solution code:
s = input()
w = int(input())

ans = ''
for i in range(0, len(s), w):
    ans += s[i]
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
num = 1
while num * (num + 1) <= 2 * n:
  num += 1
now = n
for i in range(num,0,-1):
  if now >= i:
    print(i)
    now -= i

Submission status: Runtime Error

Solution code:
s = input()
if len(s) <= 2:
  print(s)
else :
  for i in reversed(s)
  print(i)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())

for i in range(K):
  if i % 2 == 0:
    B = B + A/2
    A = A/2
   else:
    A = A + B/2
    B = B/2 
print ('{} {}'.format(A,B))

Submission status: Runtime Error

Solution code:
S = input()

if len(S) == 2:
	print (S)
else:
	new_str_list = list(reversed(S))
	#print(new_str_list)
    print (new_str_list.join(''))

Submission status: Runtime Error

Solution code:
S= str(input())

if len(S) == 2:
  print (S)
 else:
	print (reversed(S))

Submission status: Runtime Error

Solution code:
S=input()
if S.len()==2:print(S)
else:print(S[::-1])

Submission status: Runtime Error

Solution code:
print(input() if len(input())==2 else input()[::-1])

Submission status: Runtime Error

Solution code:
a = input()
if len(a) == 2:
  print(a)
else:
  print(reverse(a))

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
count = 0
while count<K:
    if count%2==0:
        if A%2==0:
            A//=2
            B+=A
        else:
            A-=1
            A//=2
            B+=A
    else:
        if B%2==0:
            B//=2
            A+=B
        else:
            B-=1
            B//=2
            A+=B
    count+=1
print(A,B)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
K=int(input())
count = 0
while count<K:
    if count%2==0:
        if A%2==0:
            A//=2
            B+=A
        else:
            A-=1
            A//=2
            B+=A
    else:
        if B%2==0:
            B//=2
            A+=B
        else:
            B-=1
            B//=2
            A+=B
    count+=1
print(A,B)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
K=int(input())
count = 0
while count<K:
    if count%2==0:
        if A%2==0:
            A//=2
            B+=A
        else:
            A-=1
            A//=2
            B+=A
    else:
        if B%2==0:
            B//=2
            A+=B
        else:
            B-=1
            B//=2
            A+=B
    count+=1
print(A,B,count)

Submission status: Runtime Error

Solution code:
if len(S)==2:
    print(S)
elif len(S)==3:
    print(S[::-1])

Submission status: Runtime Error

Solution code:
s = list(input())
if len(s) == 3:
    print(s[::-1].join())
else:
    print(s.join())

Submission status: Runtime Error

Solution code:
S = input()

if len(S) == 2: