/*
Online Java - IDE, Code Editor, Compiler
Online Java is a quick and easy tool that helps you to build, compile, test your programs
online.
*/
import java.util.*;

public class Main
{
    public static void main(String[] args) 
    {
        System.out.println("Welcome to Online IDE!! Happy Coding :)");
    }
    
    char lowerCase [ ] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
    char upperCase [ ] ={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','q','r','s','t','u','v','w','x','y','z'};
    String text = "Happy Birthday";
    
    reverseCase rc = new reverseCase(lowerCase, upperCase, text);
    rc.reverseCase();
}

class reverseCase
{
    private char[] lowercase;
    private char[] uppercase;
    private String text;
    
    public int test()
    {
        return 1;
    }
    
    public StringBuffer reverseCase()
    {
        StringBuffer sb = new StringBuffer();
        sb.append(text);
        
        for (int i=0; i<text.length();i++)
        {
            for (int j=0;j<lowercase.length; j++)
            {
                if (sb.charAt(i)==lowercase[j])
                {
                    sb.insert(i,uppercase[j]);
                }
                
                if (sb.charAt(i)==uppercase[j])
                {
                    sb.insert(i,lowercase[j]);
                }
            }
        }
        
        System.out.println("test");
        System.out.println(sb);
        return sb;
    }
    
    public reverseCase (char[] lowercase, char[]upperCase, String text)
    {
        this.lowercase=lowercase;
        this.uppercase=uppercase;
        this.text=text;
        
        System.out.println("up to here");
        reverseCase();
    }
}