/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	static int indexOfIgnoreCase(String str, String find, int start) {
		for(int i = start; i < str.length(); i++) {
			if(str.substring(i, i + find.length()).equalsIgnoreCase(find)) {
				return i;
			}
		}
		return -1;
	}

	static void solve(String sentence) {
		String find = "java";
	    String replace = "JAVA";
	    int index = 0;
	    while(index < sentence.length()) {
	    	index = indexOfIgnoreCase(sentence, find, index);
	    	if(index == -1) {
	    		break;
	    	}
	        sentence = sentence.substring(0, index) +    			// string up to found word
	                   replace +                       				// replace found word
	                   sentence.substring(index + find.length());   // remaining part of the string
	        index += find.length();
	    }
	    System.out.println(sentence);
	}
	
	public static void main (String[] args) throws java.lang.Exception
	{
		String sentence = "Java, JAva, java, JaVa, JAVa";
		solve(sentence);
	}
}