// Here's a solution using a handy existing library routine.

class Hello {
    private static String revstr(String s) {
	return new String((new StringBuffer(s)).reverse());
    }

    public static void main(String args[]) {
	String w = args[0];
	System.out.println("Hello " + revstr(w) + "!");
    }
}

// Here's a solution that does the reversal work by hand.

class Hellox {
    private static String revstr(String s) {
        StringBuffer b = new StringBuffer(s);
	int slen = b.length();
	for (int i = 0; i < slen / 2; i++) {
	    char t = b.charAt(slen-1-i);
	    b.setCharAt(slen-1-i,b.charAt(i));
	    b.setCharAt(i,t);
	}
	return new String(b);
    }

    public static void main(String args[]) {
	String w = args[0];
	System.out.println("Hello " + revstr(w) + "!");
    }
}


