title: Lexicographically Next String
signature: fun lexicographicallyNextString(s: String): String {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:String, expected:String):Boolean{
    return actual.equals(expected)
  }
  fun driver(s: String, expected:String):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(s), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver("amKIRzPiqLTIy", "amKIRzPiqLTIz")
      println("TEST-0...${result}")
      
      result = driver("68", "69")
      println("TEST-1...${result}")
      
      result = driver("100", "110")
      println("TEST-2...${result}")
      
      result = driver("f", "g")
      println("TEST-3...${result}")
      
      result = driver("802205375", "802206375")
      println("TEST-4...${result}")
      
      result = driver("0111", "0211")
      println("TEST-5...${result}")
      
      result = driver("GRjRYIvYwgua", "GRjRYIvYwgub")
      println("TEST-6...${result}")
      
      result = driver("8139910006809", "813:910006809")
      println("TEST-7...${result}")
      
      result = driver("100101", "200101")
      println("TEST-8...${result}")
      
      result = driver("rw", "rx")
      println("TEST-9...${result}")
      
          
  }
  
  main()
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;
  }