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:
import heapq
from sys import stdin
input = stdin.readline

#入力
s = input()[0:-1]
# n = int(input())
# a = list(map(int,input().split()))
# a = [int(input()) for i in range()]


# ab=[]
# for i in range():
#     a,b = map(int, input().split())
#     ab.append([a,b])


     
def main():
    if len(s)==2:
        print(s)
    else:
        print(s[::-1])
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input().rstrip()
    print(s if len(s) == 2 else s[::-1])


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    N = (input().rstrip())

    if(len(N) == 3):
        N= ''.join(list(reversed(N)))
    
    print(N)
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)

else:
    print("".join(reversed(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 = input() #sys.stdin.readlineは最後が改行

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

Submission status: Accepted

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

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:
import sys
def input(): return sys.stdin.readline().strip()

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

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:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

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

resolve()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = read().rstrip().decode()
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:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

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()
print(s[::-len(s)*2+5])

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()
n_len = len(n)
if n_len == 2:
    print(n)
else:
    print(n[::-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()                                 
print(s if len(s) == 2 else 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:
    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:
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()
if (len(s)==3):
	s=s[::-1]
print(s)

Submission status: Accepted

Solution code:
# Tenka1 Programmer Beginner Contest 2018: A – Measure
s = input()
print(s if len(s) == 2 else s[::-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    s = S()
    if len(s) == 2:
        print(s)
    if len(s) == 3:
        print(s[::-1])
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s = list(input())
if len(s) == 2:
    print(*s, sep="")
else:
    s.reverse()
    print(*s, sep="")

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    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) == 3:
    print(s[::-1])
else:
    print(s)

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
from collections import Counter
#template
#issueから始める
S = list(input())
if len(S) == 2:
    print(''.join(S))
else:
    print(''.join(reversed(S)))

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 = list(input())

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

Submission status: Accepted

Solution code:
s=list(input())
if len(s) == 2:
    print(*s, sep='')
else:
    print(*(s[::-1]), sep='')

Submission status: Accepted

Solution code:
s=input()
ans=""

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

Submission status: Accepted

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

Submission status: Accepted

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


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)
else:
    print(S[::-1])

Submission status: Accepted

Solution code:
s = input()

print(s if len(s) == 2 else 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) == 3:
    S = S[::-1]

print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
S = stdin.readline().rstrip()
if len(S) == 2:
  print(S)
else:
  print(S[::-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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()

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()

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:
  s = S[2] + S[1] + S[0]
  print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().rstrip()
s_len = len(s)
if s_len == 2:
    print(s)
else:
    print("".join(list(s[::-1])))

Submission status: Accepted

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

s = input()
print(s if len(s) == 2 else 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:
S = input()
print(S if len(S) == 2 else S[2] + S[1] + S[0])

Submission status: Accepted

Solution code:
a = input()
if len(a) == 2:
  print(a)
else:
  new_str = ''.join(list(reversed(a)))
  print(new_str)

Submission status: Accepted

Solution code:
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools

mod = int(1e9+7)
INF = 1<<39

def main():
    s = input()
    if len(s) == 2:
        print(s)
    else:
        t = []
        for i in range(3):
            t.insert(0,s[i])
        print(''.join(t))
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()
if len(S) == 2:
  print(S)
else:
  s = ''
  for i in range(1, 4):
    s += S[-i]
  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[2]+S[1]+S[0])

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:
S=str(input())
ans=''
for i in range(len(S)):
    if len(S)==2:
        ans+=S[i]
    else:
        ans+=S[-1-i]
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
S = str(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:
    for ch in s[::-1]:
        print(ch, end='')

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

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:
# -*- coding: utf-8 -*-

S = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    if len(S)==2:
        print(S)
    else:
        print(S[::-1])
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

s=input()
n=len(s)
if n==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()
print(S if len(S)==2 else S[::-1])

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()

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

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 if len(S)==2 else S[2]+S[1]+S[0])

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
def examA():
    S = SI()
    if len(S)==3:
        ans = S[::-1]
    else:
        ans = S
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = input()[: -1]
if len(S) == 3: print(S[: : -1])
else: print(S)

Submission status: Accepted

Solution code:
S = str(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().strip()
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:
S = input()
if len(S) == 3:
  print(S[::-1])
else:
  print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
# 2019/12/2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
print(s if len(s)==2 else s[::-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:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    if len(s) == 2:
        print(s)
    else:
        s = list(s)
        s.reverse()
        print("".join(s))


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
S = str(input())

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

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()
print((s,s[::-1])[len(s)==3])

Submission status: Accepted

Solution code:
s = list(input())

if len(s) == 2:
    print("".join(s))
else:
    ans = []
    for i in range(len(s)-1,-1,-1):
        ans.append(s[i])
    else:
        print("".join(ans))

Submission status: Accepted

Solution code:
# Tenka1 Programmer Beginner Contest 2018: A – Measure
s = input()
print(s if len(s) == 2 else s[2] + s[1] + s[0])

Submission status: Accepted

Solution code:
s=input()
S=list(s)
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[:: -1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
if len(s)==2:
    for i in range(2):
        print(s[i],end="")
else:
    s.reverse()
    for i in range(3):
        print(s[i],end="")

Submission status: Accepted

Solution code:
S = input()
if len(S) == 3:
    S = S[2]+S[1]+S[0]
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:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    if len(s) == 2:
        print(s)
    else:
        print("".join([s[i] for i in range(len(s)-1, -1, -1)]))


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
if len(s) == 2:
  print(''.join(s))
else:
  s[0], s[2] = s[2], s[0]
  print(''.join(s))

Submission status: Accepted

Solution code:
S = input()
if len(S) == 3:
    S_list = list(S)
    S_list.reverse()
    print("".join(S_list))
else:
    print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
ans=''
if len(s)==2:
    print(''.join(s))
else:
    tmp=s[0]
    s[0]=s[2]
    s[2]=tmp
    print(''.join(s))

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()
if len(s) ==2:
  print(s)
elif len(s) ==3:
  print(s[::-1])

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
S=input()
N=len(S)

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

Submission status: Accepted

Solution code:
# tenka1-2018-beginnerA - Measure
def main():
    S = input().rstrip()
    flg = len(S) == 2
    print(S if flg else S[::-1])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s=list(input())
if(len(s)==3):
    a=s[0]
    s[0]=s[2]
    s[2]=a
print(''.join(s))

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:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    if len(s) == 2:
        print(s)
    else:
        print(s[2] + s[1] + s[0])


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
k = []
ans = ""
for i in range(len(S)):
  k.append(S[i])
if len(k) == 2:
  for i in range(2):
    ans += k[i]
else:
  k.reverse()
  for i in range(3):
    ans += k[i]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
print(s) if len(s) == 2 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:
# coding: utf-8
# Your code here!

S = input()

# print(S)

# print(len(S))

if len(S) == 2:
    print(S)
elif len(S) == 3:
    s_reversed = reversed(S)
    # print(s_reversed)
    # print(S.reverse())
    print(S[::-1])
else:
    pass

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 print(s[::-1])

Submission status: Accepted

Solution code:
S = str(input()).rstrip()

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

Submission status: Accepted

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

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()
if len(S) == 3:
    print(S[::-1])
else:
    print(S)

Submission status: Accepted

Solution code:
s = input()

if len(s) >= 3:
    print(s[::-1])
else:
    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()
print(S if len(S) == 2 else S[::-1])

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:
def solve(s):
    return s[::-1] if (len(s) == 3) else s

s = input()
print(solve(s))

Submission status: Accepted

Solution code:
# tenka1-2018-beginnerA - Measure
def main():
    s = input()
    print(s if len(s) == 2 else s[::-1])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

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

print(s)

Submission status: Accepted

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

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=input()
if len(S)==2:print(S)
else:print(S[::-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


S = sys.stdin.readline().rstrip()
if len(S)==2:
    print(S)
else:
    print(S[::-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Measure
https://atcoder.jp/contests/tenka1-2018-beginner/tasks/tenka1_2018_a

"""
import sys


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


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###

s = input()

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

Submission status: Accepted

Solution code:
###template###
import sys
inp = sys.stdin.readline
def input(): return inp().rstrip()
def mi(): return map(int, input().split())
###template###

s = input()

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

Submission status: Accepted

Solution code:
###template###
import sys
input = sys.stdin.readline
def mi(): return map(int, input().split())
###template###

s = input().rstrip()

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

Submission status: Accepted

Solution code:
###template###
#import sys
#input = sys.stdin.readline
def mi(): return map(int, input().split())
###template###

s = input()

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

Submission status: Accepted

Solution code:
###template###
#import sys
#input = sys.stdin.readline
#def mi(): return map(int, input().split())
###template###

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()
print(s) if len(s) == 2 else print(s[::-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input().rstrip()
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:
n = input()
print(n if len(n) == 2 else n[::-1])

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = [i for i in input()]
if len(S)==2:
    print("".join(S))
else:
    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:
def main():
    S = input()
    if len(S) == 2:
        print(S)
    else:
        print(S[::-1])


if __name__ == "__main__":
    main()

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)==3:
  print(s[::-1])
else:
  print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=str(input())

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

Submission status: Accepted

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

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

    else:
        print(s[::-1])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
if len(s) == 2:
    print(s)
elif len(s) == 3:
    s = s[::-1]
    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 = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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