For this Question: A string is called a bad string, if it follows the two conditions:
1. All odd positions of the string contain lowercase letters.
2. All even positions of the string contain uppercase letters. 
 
Determine whether a string S is bad.The first line contains the string S.

<b>Constraints</b>
S consists of uppercase and lowercase English letters.
The length of S is between 1 and 1000 (inclusive).If S is bad, print Yes; otherwise, print No.Sample Input 1 
dIfFiCuLt

Sample Output 1 
Yes

The odd- positioned characters are all lowercase and the even- positioned characters are all uppercase, so it is bad.

Sample Input 2 
eASY

Sample Output 2 
No

The 3- rd character is not lowercase, so it is not bad.

Sample Input 3 
a

Sample Output 3 
Yes, I have written this Solution Code: import java.util.*;
import java.math.*;
import java.io.*;

public class Main{

    	static FastReader fr;

            	static void solve(){

                        		String s = fr.next();


                                                		int ans = 0;

                                                                		for(int i=s.length()-1; i>=0; i--){
                                                                        			if(Character.toLowerCase(s.charAt(i))==s.charAt(i) && i%2!=0){
                                                                                    				ans = 1;
                                                                                                    				break;
                                                                                                                    			}
                                                                                                                                			if(Character.toUpperCase(s.charAt(i))==s.charAt(i) && i%2!=1){
                                                                                                                                            				ans = 1;
                                                                                                                                                            				break;
                                                                                                                                                                            			}
                                                                                                                                                                                        		}

                                                                                                                                                                                                        		System.out.println((ans==0?"Yes":"No"));

                                                                                                                                                                                                                        	}

                                                                                                                                                                                                                                  public static void main(String[] args){

                                                                                                                                                                                                                                          	fr = new FastReader();

                                                                                                                                                                                                                                                      	int t = 1;



                                                                                                                                                                                                                                                                              	for(int i=1; i<=t; i++){
                                                                                                                                                                                                                                                                                    		solve();
                                                                                                                                                                                                                                                                                              	}

                                                                                                                                                                                                                                                                                                       }


                                                                                                                                                                                                                                                                                                             static class FastReader{

                                                                                                                                                                                                                                                                                                                     		BufferedReader br;
                                                                                                                                                                                                                                                                                                                             		StringTokenizer st;

                                                                                                                                                                                                                                                                                                                                             		public FastReader(){
                                                                                                                                                                                                                                                                                                                                                     			br=new BufferedReader(new InputStreamReader (System.in));
                                                                                                                                                                                                                                                                                                                                                                 		}

                                                                                                                                                                                                                                                                                                                                                                                 		String next(){
                                                                                                                                                                                                                                                                                                                                                                                         			while(st==null || !st.hasMoreElements())
                                                                                                                                                                                                                                                                                                                                                                                                     			{
                                                                                                                                                                                                                                                                                                                                                                                                                 				try{
                                                                                                                                                                                                                                                                                                                                                                                                                                 					st=new StringTokenizer(br.readLine());
                                                                                                                                                                                                                                                                                                                                                                                                                                                     				}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                     				catch(IOException e){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     					e.printStackTrace();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         				}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         			}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     			return st.nextToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 		}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 		int nextInt(){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         			return Integer.parseInt(next());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     		}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     		long nextLong(){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             			return Long.parseLong(next());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         		}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         		Double nextDouble(){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 			return Double.parseDouble(next());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             		}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             		float nextFloat(){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     			return Float.parseFloat(next());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 		}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 	}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       }, In this Programming Language: Java, Now tell me if this Code is compilable or not?