Problem:


Score: 100 points

Problem Statement

The weather in Takahashi's town changes day by day, in the following cycle: Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...

Given is a string S representing the weather in the town today. Predict the weather tomorrow.

Constraints

S is Sunny, Cloudy, or Rainy.

Input

Input is given from Standard Input in the following format:

S

Output

Print a string representing the expected weather tomorrow, in the same format in which input is given.

Sample Input 1

Sunny

Sample Output 1

Cloudy

In Takahashi's town, a sunny day is followed by a cloudy day.

Sample Input 2

Rainy

Sample Output 2

Sunny



Sample input:
Sunny


Sample output:
Cloudy

Submission status: Accepted

Solution code:
S=input()

if S=='Sunny':
    print('Cloudy')
elif S=='Cloudy':
    print('Rainy')
elif S=='Rainy':
    print('Sunny')

Submission status: Accepted

Solution code:
d = ['Sunny', 'Cloudy',"Rainy"]
a = input()
print(d[(d.index(a)+1)%3])

Submission status: Accepted

Solution code:
w = ["Sunny","Cloudy","Rainy","Sunny"]
s = input()
pos = w.index(s)
print(w[pos+1])

Submission status: Accepted

Solution code:
S = input()
L = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']
k = L.index(S)
print(L[k+1])

Submission status: Accepted

Solution code:
s = input()
weather = ["Sunny","Cloudy","Rainy"]
print(weather[(weather.index(s)+1)%3])

Submission status: Accepted

Solution code:
def solve():
    s = input()
    if s == 'Sunny':
        print('Cloudy')
    elif s == 'Cloudy':
        print('Rainy')
    elif s == 'Rainy':
        print('Sunny')

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
S=input()

if(S=="Sunny"):
  print("Cloudy")
elif(S=="Cloudy"):
  print("Rainy")
else:
  print("Sunny")

Submission status: Accepted

Solution code:
print((lambda x:('Sunny' if x == 'Rainy' else ('Cloudy' if x == 'Sunny' else 'Rainy')))(input()))

Submission status: Accepted

Solution code:
s=input()
x=['Sunny', 'Cloudy', 'Rainy','Sunny']
print(x[x.index(s)+1])

Submission status: Accepted

Solution code:
a=["Rainy","Cloudy","Sunny"]
s=input()
for i in range(3):
    if a[i]==s:
        print(a[i-1])

Submission status: Accepted

Solution code:
li = ['Sunny', 'Cloudy', 'Rainy']
s = input()
print(li[(li.index(s)+1)%3])

Submission status: Accepted

Solution code:
s=input()
if s=='Sunny':
	print('Cloudy')
elif s=='Rainy':
	print('Sunny')
else:
	print('Rainy')

Submission status: Accepted

Solution code:
S=input()
L=["Sunny","Cloudy","Rainy"]
print(L[(L.index(S)+1)%3])

Submission status: Accepted

Solution code:
n=input()
m={'Sunny':'Cloudy','Cloudy':'Rainy','Rainy':'Sunny'}
print(m[n])

Submission status: Accepted

Solution code:
s = input()

ans = {'Sunny': 'Cloudy',
       'Cloudy': 'Rainy',
       'Rainy': 'Sunny'}

print(ans[s])

Submission status: Accepted

Solution code:
s = ["Sunny", "Cloudy", "Rainy"]
a = input()
print(s[(s.index(a) + 1) % 3])

Submission status: Accepted

Solution code:
S = input()
if S == "Sunny" :
    print("Cloudy")
elif S == "Cloudy" :
    print("Rainy")
else : print("Sunny")

Submission status: Accepted

Solution code:
s=input()
ans=["Sunny","Cloudy","Rainy","Sunny"]
for i in range(3):
  if ans[i]==s:
    print(ans[i+1])

Submission status: Accepted

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

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)


s = input()[:-1]

if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
a = input()
weather_today = {'Sunny':0 , 'Cloudy':1 , 'Rainy':2}
weather_next  = ['Cloudy', 'Rainy','Sunny']
print(weather_next[weather_today[a]])

Submission status: Accepted

Solution code:
weather=["Sunny","Cloudy","Rainy"]
S=input()
print(weather[(weather.index(S)+1)%3])

Submission status: Accepted

Solution code:
S = input()
W = ['Sunny','Cloudy','Rainy']

if S == W[0] or S == W[1]:
    print(W[W.index(S)+1])
else:
    print(W[0])

Submission status: Accepted

Solution code:
X = input()
li = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']
print(li[li.index(X)+1])

Submission status: Accepted

Solution code:
S = input()

if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
elif S == "Rainy":
    print("Sunny")

Submission status: Accepted

Solution code:
wet = ["Sunny","Cloudy","Rainy"]
s = wet.index(input())
print(wet[s+1] if s != 2 else wet[0])

Submission status: Accepted

Solution code:
s = input()

if s == 'Sunny':
    print('Cloudy')
    exit()
if s == 'Rainy':
    print('Sunny')
    exit()
if s == 'Cloudy':
    print('Rainy')
    exit()

Submission status: Accepted

Solution code:
S=input()
weather=['Sunny','Cloudy','Rainy']

for i in weather:
    if i == 'Rainy':
        print('Sunny')
        exit()
    elif i == S:
        a=weather.index(i)
        print(weather[a+1])
        exit()

Submission status: Accepted

Solution code:
s = input()

if s == 'Sunny':
    print('Cloudy')
if s == 'Cloudy':
    print('Rainy')
if s == 'Rainy':
    print('Sunny')

Submission status: Accepted

Solution code:
s = input()

w = ["Sunny", "Cloudy", "Rainy"]
if s == w[0] :
  print(w[1])
elif s == w[1]:
  print(w[2])
elif s == w[2]:
  print(w[0])

Submission status: Accepted

Solution code:
s=input()
print("Sunny" if s=="Rainy" else "Cloudy" if s=="Sunny" else "Rainy")

Submission status: Accepted

Solution code:
s = input()

list = ['Sunny', 'Cloudy', 'Rainy']

print(list[(list.index(s) + 1)%3])

Submission status: Accepted

Solution code:
s=input()
if s == "Sunny":
    print("Cloudy")
elif s == "Rainy":
    print("Sunny")
else:
    print("Rainy")

Submission status: Accepted

Solution code:
S = input()
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
S = input()
list = ["Sunny", "Cloudy", "Rainy"]
print(list[list.index(S)-2])

Submission status: Accepted

Solution code:
s = input()
l = ["Sunny", "Cloudy", "Rainy", "Sunny"]
print(l[l.index(s)+1])

Submission status: Accepted

Solution code:
dict = {0: 'Sunny', 1: 'Cloudy', 2: 'Rainy'}
S = input()
for i, k in enumerate(dict.items()):
    if k[1] == S:
        print(dict[(k[0] + 1) % 3])
        exit()

Submission status: Accepted

Solution code:
n = input()
if n == 'Sunny':
    print('Cloudy')
elif n == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
w = {'Sunny':'Cloudy', 'Cloudy':'Rainy', 'Rainy':'Sunny'}
print(w[input()])

Submission status: Accepted

Solution code:
def main():
    S = input()
    weather = ['Sunny', 'Cloudy', 'Rainy']
    idx = 0
    for i,s in enumerate(weather):
        if s == S:
            idx = i+1
    print(weather[idx]) if idx != 3 else print(weather[0])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

if s == "Sunny":
  print("Cloudy")
elif s == "Cloudy":
  print("Rainy")
elif s == "Rainy":
  print("Sunny")

Submission status: Accepted

Solution code:
s = input()
if s[0] == "S":
    print("Cloudy")
elif s[0] == "C":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
S = input()

if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Submission status: Accepted

Solution code:
s = str(input())
print("Sunny" if s == "Rainy" else "Cloudy" if s == "Sunny" else "Rainy")

Submission status: Accepted

Solution code:
W = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']

S = input()

for i in range(3):
    if W[i] == S:
        print(W[i+1])
        break

Submission status: Accepted

Solution code:
S = input()

climate = ["Sunny", "Cloudy", "Rainy"]

print(climate[(climate.index(S)+1)%3])

Submission status: Accepted

Solution code:
s = input()
l = ["Sunny","Cloudy","Rainy","Sunny"]
for i in range(3):
  if s==l[i]:
     print(l[i+1])

Submission status: Accepted

Solution code:
s=input()
wether=['Sunny', 'Cloudy', 'Rainy','Sunny']
for i in range(len(wether)):
  if s==wether[i]:
    print(wether[i+1])
    break

Submission status: Accepted

Solution code:
s = input()

list = ["","Sunny","Cloudy","Rainy"]

result = list.index(s)%3

print(list[result+1])

Submission status: Accepted

Solution code:
S=input()

Wea=['Sunny','Cloudy','Rainy']

if S==Wea[0]:
  print(Wea[1])
elif S==Wea[1]:
  print(Wea[2])
else:
  print(Wea[0])

Submission status: Accepted

Solution code:
import sys

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


def solve():
    S = input()
    sl = ['Sunny', 'Cloudy', 'Rainy']

    if S == 'Sunny':
        i = 1
    elif S == 'Cloudy':
        i = 2
    elif S == 'Rainy':
        i = 0

    print(sl[i])


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s = input()

next_weather = {
  'Sunny': 'Cloudy',
  'Cloudy': 'Rainy',
  'Rainy': 'Sunny',
}

print(next_weather[s])

Submission status: Accepted

Solution code:
wheather = ["Sunny", "Cloudy", "Rainy"]
print(wheather[wheather.index(input())-2])

Submission status: Accepted

Solution code:
s = input()
a ='Sunny'
b ='Cloudy'
c ='Rainy'
if s == a:
    print(b)
elif s == b:
    print(c)
else:
    print(a)

Submission status: Accepted

Solution code:
s=input()
if s=="Sunny":print ("Cloudy")
if s=="Cloudy":print("Rainy")
if s=="Rainy":print("Sunny")

Submission status: Accepted

Solution code:
s=input()
l=["Sunny","Cloudy","Rainy","Sunny"]
print(l[l.index(s)+1])

Submission status: Accepted

Solution code:
s = input()
if s[0] == 'S': print('Cloudy')
elif s[0] == 'C': print('Rainy')
else: print('Sunny')

Submission status: Accepted

Solution code:
s = input()
if s =="Sunny":
    print("Cloudy")
elif s=="Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
import sys
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

def main():
    s = input()
    if s[0] == "S":
        print("Cloudy")
        return
    elif s[0] == "C":
        print("Rainy")
        return
    print("Sunny")
    

    
    
main()

Submission status: Accepted

Solution code:
s = input()
d = {'Sunny':'Cloudy', 'Cloudy':'Rainy', 'Rainy':'Sunny'}
print(d[s])

Submission status: Accepted

Solution code:
W={"Sunny":"Cloudy","Cloudy":"Rainy","Rainy":"Sunny"}
print(W[input()])

Submission status: Accepted

Solution code:
w=["Sunny","Cloudy","Rainy","Sunny"];print(w[w.index(input())+1])

Submission status: Accepted

Solution code:
n=input()
l=[ "Sunny","Cloudy", "Rainy","Sunny"]
for i in range(3):
    if n==l[i]:
        print(l[i+1])
        break

Submission status: Accepted

Solution code:
s = input()
ans = "Sunny"
if s == "Sunny":
  ans = "Cloudy"
elif s == "Cloudy":
  ans = "Rainy"
print(ans)

Submission status: Accepted

Solution code:
S = input()

forecast = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Sunny"}
print(forecast[S])

Submission status: Accepted

Solution code:
def main():
    W = ['Sunny', 'Cloudy', 'Rainy']
    S = input()
    i = (W.index(S) + 1) % 3
    print(W[i])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
weather = ["Sunny","Cloudy","Rainy"]
S = input()
print(weather[(weather.index(S)+1)%3])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
a, b, c = 'Sunny', 'Cloudy', 'Rainy'
if s == a:
    print(b)
elif s == b:
    print(c)
else:
    print(a)

Submission status: Accepted

Solution code:
def main():
  s=input()
  if(s=='Sunny'):
    print('Cloudy')
  elif(s=='Cloudy'):
    print('Rainy')
  else:
    print('Sunny')
main()

Submission status: Accepted

Solution code:
s = input()

if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
s=input()
if s=='Sunny':
    print('Cloudy')
elif s=='Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
S = input()
if S=="Sunny":
  print("Cloudy")
elif S=="Cloudy":
  print("Rainy")
else:
  print("Sunny")

Submission status: Accepted

Solution code:
# coding: utf-8
s = input()
if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
S = input()

if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit

WEATHERS = [
    "Sunny",
    "Cloudy",
    "Rainy"
]


def main():
    input = stdin.buffer.readline
    s = input()[:-1].decode()
    print(WEATHERS[(WEATHERS.index(s) + 1) % 3])


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:

def f(s):
	es = ['Sunny', 'Cloudy', 'Rainy']
	h = {e:i for i,e in enumerate(es)}
	return es[(h[s] + 1)%3]

print f(raw_input())

Submission status: Accepted

Solution code:
S = input()
L = ['Sunny', 'Cloudy', 'Rainy']
print(L[(L.index(S)+1)%3])

Submission status: Accepted

Solution code:
w = input()
W = ["Sunny", "Cloudy", "Rainy","Sunny"]

for i in range(3):
  if w==W[i]:
    print(W[i+1])

Submission status: Accepted

Solution code:
import sys
from collections import Counter
from collections import deque
import math
import fractions
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

s=input()
ans=["Sunny","Cloudy","Rainy","Sunny"]
print(ans[ans.index(s)+1])

Submission status: Accepted

Solution code:
def resolve():
  s = input()
  if s == 'Sunny':
    print('Cloudy')
  elif s == 'Cloudy':
    print('Rainy')
  else:
    print('Sunny')

  return

if __name__ == "__main__":
  resolve()

Submission status: Accepted

Solution code:
S = input()

if "Sunny"==S:
    print("Cloudy")
elif "Cloudy"==S:
    print("Rainy")
elif "Rainy"==S:
    print("Sunny")

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("Cloudy" if s == "Sunny" else "Sunny" if s == "Rainy" else "Rainy")


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
lis = ['Sunny', 'Cloudy', 'Rainy']
S = input()
idx = lis.index(S)
if idx==2:
    print(lis[0])
else:
    print(lis[idx+1])

Submission status: Accepted

Solution code:
s = input()
li = ['Sunny', 'Cloudy', 'Rainy']
for i in range(3):
    if s==li[i]:
        print(li[(i+1)%3])

Submission status: Accepted

Solution code:
s = input()

ans = "Sunny"
if s == "Sunny":
  ans = "Cloudy"
elif s == "Cloudy":
  ans = "Rainy"

print(ans)

Submission status: Accepted

Solution code:
S = input()

if S == "Sunny":
    ans = "Cloudy"
elif S == "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    a='Sunny'
    b='Cloudy'
    c='Rainy'
    if s==a:
        print(b)
    elif s==b:
        print(c)
    else:
        print(a)
resolve()

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    s=readline().strip()
    
    if s=="Sunny":
        print("Cloudy")
    elif s=="Cloudy":
        print("Rainy")
    else:
        print("Sunny")
        
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
if s == "Sunny": print("Cloudy")
elif s == "Cloudy": print("Rainy")
elif s == "Rainy": print("Sunny")

Submission status: Accepted

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

S = input()

if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
weather=["Sunny","Cloudy","Rainy","Sunny"]
print(weather[weather.index(input())+1])

Submission status: Accepted

Solution code:
s = input()

l = ['Sunny', 'Cloudy', 'Rainy']
l_next = l[1:]+l[:1]

d = {}
for k,v in zip(l,l_next):
    d[k] = v

print(d[s])

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


s = S()
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
S=input()

if S[0]=="S":
  print("Cloudy")
elif S[0]=="C":
  print("Rainy")
else:
  print("Sunny")

Submission status: Accepted

Solution code:
#ABC 141
S =input()
W =["Sunny", "Cloudy", "Rainy"]
for i,w in enumerate(W):
    if w==S:
        print(W[(i+1)%3])
        exit()

Submission status: Accepted

Solution code:
S = input()

if S == 'Sunny':
    print('Cloudy')
elif S == 'Cloudy':
    print('Rainy')
elif S == 'Rainy':
    print('Sunny')

Submission status: Accepted

Solution code:
s = input()
if(s[0] == 'S'):
  print('Cloudy')
elif(s[0] == 'C'):
  print('Rainy')
else:
  print('Sunny')

Submission status: Accepted

Solution code:
s = input()
if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
s = input()
weather = ['Sunny','Cloudy','Rainy']
print(weather[(weather.index(s) + 1) % 3])

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

S = rs()

t2i = {'Sunny':0, 'Cloudy':1, 'Rainy':2}
i2t = ['Sunny', 'Cloudy', 'Rainy']

i = (t2i[S]+1)%3
print(i2t[i])

Submission status: Accepted

Solution code:
d = {"Sunny":"Cloudy", "Cloudy":'Rainy', 'Rainy':'Sunny'}
print( d[input()])

Submission status: Accepted

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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    S = readline().rstrip().decode()
    if S == 'Sunny':
        print('Cloudy')
    elif S == 'Cloudy':
        print('Rainy')
    elif S == 'Rainy':
        print('Sunny')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

weather = {"Sunny":"Cloudy", "Cloudy":"Rainy", "Rainy":"Sunny"}

print(weather[input().rstrip()])

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    S = input().strip("\n")
    if S[0] == "S": print("Cloudy")
    elif S[0] == "C":print("Rainy")
    else: print("Sunny")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
weather = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']
S = input()
for i in range(3):
    if weather[i] == S:
        print(weather[i + 1])

Submission status: Accepted

Solution code:
s=input()
if(s=='Sunny'):
    print('Cloudy')
elif(s=='Cloudy'):
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
S = input()
w = {'Sunny':'Cloudy', 'Cloudy':'Rainy', 'Rainy':'Sunny'}
print(w[S])

Submission status: Accepted

Solution code:
Weather = ['Sunny','Cloudy','Rainy']
S = input()
for i,s in enumerate(Weather):
    if s == S:
        print(Weather[(i+1)%3])

Submission status: Accepted

Solution code:
S = input().strip()
if S=="Sunny":
    print("Cloudy")
elif S=="Cloudy":
    print("Rainy")
elif S=="Rainy":
    print("Sunny")

Submission status: Accepted

Solution code:
s = str(input())
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

S = input()[:-1]

if S=='Sunny':
    print('Cloudy')
elif S=='Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
def examA():
    W = {'Sunny':'Cloudy','Cloudy':'Rainy','Rainy':'Sunny'}
    S = SI()
    ans = W[S]
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    # https://tjkendev.github.io/procon-library/python/string/z-algorithm.html
    def z_algo(S):
        N = len(S)
        A = [0] * N
        i = 1; j = 0
        A[0] = l = len(S)
        while i < l:
            while i + j < l and S[j] == S[i + j]:
                j += 1
            if not j:
                i += 1
                continue
            A[i] = j
            k = 1
            while l - i > k < j - A[k]:
                A[i + k] = A[k]
                k += 1
            i += k; j -= k
        return A
    N = I()
    S = SI()
    ans = 0
    for i in range(N):
        Z = z_algo(S[i:])
        for k,n in enumerate(Z[1:]):
            cur = min(k+1,n)
            ans = max(ans,cur)
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math,random
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()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

if __name__ == '__main__':
    examA()

"""

"""

Submission status: Accepted

Solution code:
s = input()
wt = ["Sunny", "Cloudy", "Rainy"]

if s == wt[0]:
    print(wt[1])
elif s == wt[1]:
    print(wt[2])
else:
    print(wt[0])

Submission status: Accepted

Solution code:
S = input()
weather = ["Sunny", "Cloudy", "Rainy"]
a = weather.index(S)
print(weather[(a+1)%3])

Submission status: Accepted

Solution code:
s = input()
l = ['Sunny', 'Cloudy', 'Rainy']
print(l[l.index(s) - 2])

Submission status: Accepted

Solution code:
s=input()
print('Sunny' if s=='Rainy' else 'Cloudy' if s=='Sunny' else 'Rainy')

Submission status: Accepted

Solution code:
weather=["Sunny","Cloudy","Rainy"]
S=input()
print(weather[weather.index(S)-2])

Submission status: Accepted

Solution code:
S = input()
wheather = ''

if S == 'Sunny':
    wheather = 'Cloudy'
if S == 'Cloudy':
    wheather = 'Rainy'
if S == 'Rainy':
    wheather = 'Sunny'

print(wheather)

Submission status: Accepted

Solution code:
s = input()
if s[0] == "S":
    print ("Cloudy")
elif s[0] == "C":
    print ("Rainy")
else:
    print ("Sunny")

Submission status: Accepted

Solution code:
s = input()
w = {
  'Sunny': 'Cloudy'
  , 'Cloudy': 'Rainy'
  , 'Rainy': 'Sunny'
}
print(w[s])

Submission status: Accepted

Solution code:
l = ['Sunny','Cloudy','Rainy']
s = input()

save = 0
for i in range(3):
    if(l[i]==s):
        save = i

save = (save+1)%3
print(l[save])

Submission status: Accepted

Solution code:
s = input()
tenki = ["Sunny", "Cloudy", "Rainy" ]
print(tenki[tenki.index(s)+1] if s != "Rainy" else tenki[0])

Submission status: Accepted

Solution code:
S = input()
print("Sunny" if S == "Rainy" else "Cloudy" if S == "Sunny" else "Rainy")

Submission status: Accepted

Solution code:
S=input()
if S=='Sunny' :
    print('Cloudy')
elif S=='Cloudy' :
    print('Rainy')
elif S=='Rainy' :
    print('Sunny')

Submission status: Accepted

Solution code:
x = ["Sunny", "Cloudy", "Rainy"]
y = input()
if y == "Rainy":
    print(x[0])
else:
    print(x[x.index(y)+1])

Submission status: Accepted

Solution code:
s = input()
if s == 'Sunny':
	print('Cloudy')
elif s == 'Cloudy':
	print('Rainy')
else:
	print('Sunny')

Submission status: Accepted

Solution code:
List = ['Sunny', 'Cloudy', 'Rainy']
S = input()
print(List[(List.index(S) + 1) % 3])

Submission status: Accepted

Solution code:
def weather_prediction(s):

    ans = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Sunny"}

    return ans[s]
def main():
    s = str(input())
    print(weather_prediction(s))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s=input()
d={'Sunny':'Cloudy','Cloudy':'Rainy','Rainy':'Sunny'}
print(d[s])

Submission status: Accepted

Solution code:
weathers = ['Sunny', 'Cloudy', 'Rainy' ]
s = str(input())
t = weathers.index(s)
print(weathers[t-2])

Submission status: Accepted

Solution code:
s=input()
 
if s=="Sunny":
  a="Cloudy"
elif s=="Cloudy":
  a="Rainy"
else:
  a="Sunny"
print(a)

Submission status: Accepted

Solution code:
list = ["Sunny","Cloudy","Rainy"]
s = str(input())
a = list.index(s)
if a == 2:
    a = -1
print(list[a+1])

Submission status: Accepted

Solution code:
S = input()

if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
L=["Sunny","Cloudy","Rainy","Sunny"]
print(L[L.index(input())+1])

Submission status: Accepted

Solution code:
s = input()
t = ["Sunny", "Cloudy", "Rainy", "Sunny"]
print(t[t.index(s)+1])

Submission status: Accepted

Solution code:
s = input()

S = 'Sunny'
C = 'Cloudy'
R = 'Rainy'

if s == S:
    print(C)
if s == C:
    print(R)
if s == R:
    print(S)

Submission status: Accepted

Solution code:
S = input()
dic = {"Sunny":"Cloudy","Rainy":"Sunny","Cloudy":"Rainy"}
print(dic[S])

Submission status: Accepted

Solution code:
d = input()
if d == 'Sunny':
  print('Cloudy')
elif d == 'Cloudy':
  print('Rainy')
  
else:
  print('Sunny')

Submission status: Accepted

Solution code:
s=input()
if s[0] == 'S':
  s = 'Cloudy'
elif s[0] == 'C':
  s = 'Rainy'
else:
  s = 'Sunny'
print(s)

Submission status: Accepted

Solution code:
l=['Sunny','Cloudy','Rainy'];print(l[l.index(input())-2])

Submission status: Accepted

Solution code:
"""
abc141
"""

w = input()

if (w == "Sunny"):
    print("Cloudy")
elif (w == "Cloudy"):
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
d={"Sunny":"Cloudy","Cloudy":"Rainy","Rainy":"Sunny"}
print(d[input().strip()])

Submission status: Accepted

Solution code:
l=["Sunny", "Cloudy","Rainy"]
s=input()
print(l[(l.index(s)+1)%3])

Submission status: Accepted

Solution code:
Ss = input().rstrip()

Ts = ['Sunny', 'Cloudy', 'Rainy']

for i in range(3):
    if Ts[i] == Ss:
        print(Ts[(i+1)%3])

Submission status: Accepted

Solution code:
weather = ['Sunny', 'Cloudy', 'Rainy']
S = weather.index(input()) + 1
print(weather[0] if S > 2 else weather[S])

Submission status: Accepted

Solution code:
s = input()
ans = "Sunny"
if s == "Sunny":
  ans = "Cloudy"
if s == "Cloudy":
  ans = "Rainy"
print(ans)

Submission status: Accepted

Solution code:
N=input()
print("Cloudy"if N=="Sunny"else "Rainy"if N=="Cloudy"else"Sunny")

Submission status: Accepted

Solution code:
l = ['Sunny', 'Cloudy', 'Rainy']
s = input().rstrip()
si = l.index(s) + 1
if si == 3:
    si = 0

print(l[si])

Submission status: Accepted

Solution code:
n = input()
w = ["Sunny", "Cloudy", "Rainy"]
for i in range(3):
    if w[i]==n:
        break
print(w[(i+1)%3])

Submission status: Accepted

Solution code:
S = {"Sunny":"Cloudy", "Cloudy":"Rainy", "Rainy":"Sunny"}
k = input()

print(S[k])

Submission status: Accepted

Solution code:
s = input()
seasons = ["Sunny", "Cloudy", "Rainy", "Sunny"]
print(seasons[seasons.index(s) + 1])

Submission status: Accepted

Solution code:
S = str(input())
 
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Submission status: Accepted

Solution code:
s = input()

a = ["Sunny", "Cloudy","Rainy"]

if(s == a[0]):
  print(a[1])
elif(s == a[1]):
  print(a[2])
else:
  print(a[0])

Submission status: Accepted

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

s = str(input())

weth_list = ["Sunny", "Cloudy", "Rainy"]

tom_index = (weth_list.index(s)+1) % 3

print(weth_list[tom_index])

Submission status: Accepted

Solution code:
a=["Sunny","Cloudy","Rainy"]
s=input()
print(a[(a.index(s)+1)%len(a)])

Submission status: Accepted

Solution code:
# input
S = input()

# check
W = ['Sunny', "Cloudy", "Rainy", "Sunny"]
print(W[W.index(S) + 1])

Submission status: Accepted

Solution code:
s = input()

if s == "Rainy":
  print("Sunny")
elif s == "Cloudy":
  print("Rainy")
else:
  print("Cloudy")

Submission status: Accepted

Solution code:
s=input()
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
s = str(input())

if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
s = input()

if "S" in s:
    print("Cloudy")
elif "C" in s:
    print("Rainy")
else:
    print("Sunny")

Submission status: Accepted

Solution code:
s = input()
if "Sunny" == s:
    print("Cloudy")
elif "Cloudy" == s:
    print("Rainy")
elif "Rainy" == s:
    print("Sunny")

Submission status: Accepted

Solution code:
S=input()

if "Sunny"==S:
    print("Cloudy")
elif "Cloudy"==S:
    print("Rainy")
elif "Rainy"==S:
    print("Sunny")

Submission status: Accepted

Solution code:
S = input()
List = ["Sunny", "Cloudy", "Rainy"]
print(List[(List.index(S)+1)%3])

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
s = input()
if s == "Sunny":
    print("Cloudy")
if s == "Cloudy":
    print("Rainy")
if s == "Rainy":
    print("Sunny")

Submission status: Accepted

Solution code:

s =input()

w=["Sunny", "Cloudy", "Rainy"]

print(w[(w.index(s)+1)%3])

Submission status: Accepted

Solution code:
s = input()
w = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']
for i in range(3):
    if s == w[i]:
        print(w[i + 1])
        break

Submission status: Accepted

Solution code:
w=["Sunny","Cloudy","Rainy"]
s=input()
t=w.index(s)
print(w[t-2])

Submission status: Accepted

Solution code:

s = input()
arr = ["Sunny", "Cloudy", "Rainy"]
if s == arr[0]:
    print(arr[1])
elif s == arr[1]:
    print(arr[2])
elif s == arr[2]:
    print(arr[0])

Submission status: Accepted

Solution code:
s=input()
if  s=="Sunny":
  print("Cloudy")
elif s=="Cloudy":
  print("Rainy")
else:
  print("Sunny")

Submission status: Accepted

Solution code:
w = ['Sunny','Cloudy','Rainy','Sunny']
print(w[w.index(input())+1])

Submission status: Accepted

Solution code:
import os, sys, re, math

weathers = ['Sunny', 'Cloudy', 'Rainy']

S = input()
i = weathers.index(S)

print(weathers[(i + 1) % 3])

Submission status: Accepted

Solution code:
S = input()
s = ['Sunny', 'Cloudy', 'Rainy']
s = s + s
print(s[s.index(S) + 1])

Submission status: Accepted

Solution code:
S = input()
if S[0] == 'S':
    print('Cloudy')
elif S[0] == 'C':
    print('Rainy')
else:
    print('Sunny')

Submission status: Accepted

Solution code:
s = input()
if s == 'Sunny':
	print ('Cloudy')
elif s == 'Cloudy':
	print ('Rainy')
else:
	print ('Sunny')

Submission status: Accepted

Solution code:
w = ['Sunny', 'Cloudy', 'Rainy']
print(w[(w.index(input()) + 1) % 3])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
s = input()
l = ['Sunny', 'Cloudy', 'Rainy'] + ['Sunny', 'Cloudy', 'Rainy']
print(l[l.index(s)+1])

Submission status: Accepted

Solution code:
s = input()
weather = ["Sunny", "Cloudy", "Rainy"];
print(weather[(weather.index(s) + 1 ) % 3])