title: Lexicographically Next String
signature: lexicographicallyNextString(s) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(String actual, String expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(s, String expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          "amKIRzPiqLTIy", 
          "amKIRzPiqLTIz")
      }");
  
      print("TEST-1...${driver(
          "68", 
          "69")
      }");
  
      print("TEST-2...${driver(
          "100", 
          "110")
      }");
  
      print("TEST-3...${driver(
          "f", 
          "g")
      }");
  
      print("TEST-4...${driver(
          "802205375", 
          "802206375")
      }");
  
      print("TEST-5...${driver(
          "0111", 
          "0211")
      }");
  
      print("TEST-6...${driver(
          "GRjRYIvYwgua", 
          "GRjRYIvYwgub")
      }");
  
      print("TEST-7...${driver(
          "8139910006809", 
          "813:910006809")
      }");
  
      print("TEST-8...${driver(
          "100101", 
          "200101")
      }");
  
      print("TEST-9...${driver(
          "rw", 
          "rx")
      }");
  
      return 0;
  }
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;
  }