No test case pass !What is the wrong in this program

import java.util.*;
public class Main {
public static void towerOfHanoi(int n,char from_peg, char to_peg,char aux_peg)
{
if(n==1)
{
System.out.println("move ring 1 from "+ from_peg + " to "+ to_peg);
return;
}

	towerOfHanoi(n-1, from_peg, aux_peg, to_peg);
	System.out.println("Move ring "+ n +" from "+ from_peg +" to "+ to_peg);
	towerOfHanoi(n-1,aux_peg, to_peg, from_peg);
}

public static void main(String[] args) {
	Scanner sc=new Scanner(System.in);
	int n= sc.nextInt();
	towerOfHanoi(n,'A','B','C');
	
}

}

@Ashi,
Your code logic is correct. You just need to follow the correct output format. Corrected code: https://ide.codingblocks.com/s/242856

Print “Moving” instead of “Move” as mentioned in the question description.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.