<s>[INST] package stringchallenge;

import java.util.Scanner;

public class Main {

	static String onechar(string c){
		String str=c.toUpperCase();
		StringBuilder onechar = new StringBuilder();
		for (int i = str.length()-1; i>=0; i--){
			System.out.println(str.charAt(i));
			onechar.insert(0, str.charAt(i));
		}
		System.out.println(onechar);
		return onechar.toString();
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("Enter the string: ");
		String c1 = sc.nextLine();
		System.out.println(onechar(c1));
	}
	}
However, this script doesn't run on the online compiler either that I am using. What could be the reason?[/INST]