title: Lexicographically Next String
signature: def lexicographicallyNextString(s: String) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: String , expected: String): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(s: String, expected: String): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(s),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        "amKIRzPiqLTIy", 
        "amKIRzPiqLTIz"    
      )}")   
  
  
      println(s"TEST-1...${driver(
        "68", 
        "69"    
      )}")   
  
  
      println(s"TEST-2...${driver(
        "100", 
        "110"    
      )}")   
  
  
      println(s"TEST-3...${driver(
        "f", 
        "g"    
      )}")   
  
  
      println(s"TEST-4...${driver(
        "802205375", 
        "802206375"    
      )}")   
  
  
      println(s"TEST-5...${driver(
        "0111", 
        "0211"    
      )}")   
  
  
      println(s"TEST-6...${driver(
        "GRjRYIvYwgua", 
        "GRjRYIvYwgub"    
      )}")   
  
  
      println(s"TEST-7...${driver(
        "8139910006809", 
        "813:910006809"    
      )}")   
  
  
      println(s"TEST-8...${driver(
        "100101", 
        "200101"    
      )}")   
  
  
      println(s"TEST-9...${driver(
        "rw", 
        "rx"    
      )}")   
  
  }
  
source_py: def lexicographically_next_string(s):
      if (s == ' '):
          return 'a'
      i = (len(s) - 1)
      while ((s[i] == 'z') and (i >= 0)):
          i -= 1
      if (i == (- 1)):
          s = (s + 'a')
      else:
          s = s.replace(s[i], chr((ord(s[i]) + 1)), 1)
      return s
source_cpp: string lexicographically_next_string(string s) {
    if ( s == "" ) return "a";
    int i = s . length ( ) - 1;
    while ( s [ i ] == 'z' && i >= 0 ) i --;
    if ( i == - 1 ) s = s + 'a';
    else s [ i ] ++;
    return s;
  }