public class Torres_Hanoi {

    static int movtos ;

    static public void main(String args[])
    {
       movtos = 1;
       mover_discos('A', 'B', 'C', 3);
    }

    static public void mover_discos(char a, char b, char c, int n)
    {
        if (n > 0) {
            mover_discos(a, c, b, n - 1);
            System.out.printf("%d Mover un disco del poste %c al poste %c\n", movtos++, a, c);
            mover_discos(b, a, c, n - 1);
        }
    }
}
