title: Lexicographically Next String
signature: lexicographically_next_string <- function(s) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(s, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(s), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "amKIRzPiqLTIy", 
          "amKIRzPiqLTIz"
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "68", 
          "69"
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "100", 
          "110"
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "f", 
          "g"
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "802205375", 
          "802206375"
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "0111", 
          "0211"
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "GRjRYIvYwgua", 
          "GRjRYIvYwgub"
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "8139910006809", 
          "813:910006809"
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "100101", 
          "200101"
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          "rw", 
          "rx"
      )))
  
  }
  
  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;
  }