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

Solution in C (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>
#define D_SIZE_BUFF 200
#define TRUE 0
#define FALSE 1

int main()
{
    char s[D_SIZE_BUFF];
    int size=0;
    
    int flag_gusu_fumiyasui = FALSE;
    int flag_kisu_fumiyasui = FALSE;

    // get input data
    for(int i=0; i<D_SIZE_BUFF; i++){s[i]='0';}
    scanf("%s", s);
    
    // size count
    for(int i=0; i<D_SIZE_BUFF; i++)
    {
        if(s[i]=='L'||s[i]=='R'||s[i]=='U'||s[i]=='D')
        size++;
    }

    //             .     .     .
    // judge gusu [0][1][2][3][4]   1,3,... is gusu
    for(int i=0; i<size; i++)
    {
        // gusu igai skip
        if(i%2==0) continue;
        if(s[i]=='R'||s[i]=='U'||s[i]=='D')
        {
            flag_gusu_fumiyasui = TRUE;
        }
        else
        {
            flag_gusu_fumiyasui = FALSE;
            break;
        }
    }

    //                .     .
    // judge kisu [0][1][2][3][4]   0,2,... is kisu
    for(int i=0; i<size; i++)
    {
        // kisu igai skip
        if(i%2==1) continue;
        if(s[i]=='L'||s[i]=='U'||s[i]=='D')
        {
            flag_kisu_fumiyasui = TRUE;
        }
        else
        {
            flag_kisu_fumiyasui = FALSE;
            break;
        }
    }

    // judge matome
    if( flag_gusu_fumiyasui == TRUE && flag_kisu_fumiyasui == TRUE)
    {
        printf("Yes");
    }
    else
    {
        printf("No");
    }
    
    return 0;
}