If not then we have to call recursion from 1 st to all elements then add recursion result to 1 st element and return it
String smallOutput = replacePi ( s . substring ( 1 ) ) ; return s . charAt ( 0 ) + smallOutput ; } }