If you call Mys(7)
you will get the specified output.
Here's how it works:
Mys(0)
always prints "a".Mys(1)
always prints "b".Mys(2)
always callsMys(1)
thenMys(0)
, therefore always prints "ba".Mys(3)
always prints "c".Mys(4)
always callsMys(3)
thenMys(2)
, therefore always prints "cba".Mys(5)
always callsMys(4)
thenMys(3)
, therefore always prints "cbac".Mys(6)
always callsMys(5)
thenMys(4)
, therefore always prints "cbaccba".Mys(7)
always callsMys(6)
thenMys(5)
, therefore always prints "cbaccbacbac".