/**
* @param args
*/
public static void main(String[] args) {
moveMethod(3,"A","B","C");
}
public static void moveMethod(int count,String one,String two,String three){
if(count==1){
move(one,three);
}else{
moveMethod(count-1,one,three,two);
move(one,three);
moveMethod(count-1,two,one,three);
}
}
public static void move(String one,String other){
System.out.println("from "+one+" to "+other);
}