title: Decode Median String Original String
signature: string decodeMedianStringOriginalString(string s) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(string actual, string expected){
      return actual == expected;
  }
  
  string driver(string s, string expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(" EgvQCeqYpZtv", "tpqCvE gQeYZv"); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver("488540", "484850"); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver("0000101010111", "1000000011111"); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver("syw", "ysw"); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver("402355", "524035"); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver("0", "0"); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver("wmHMlAtq", "tlHwmMAq"); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver("7962", "6792"); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver("111111", "111111"); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver("UbgRGDquop", "oqGgUbRDup"); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
source_py: def decode_median_string_original_string(s):
      l = len(s)
      s1 = ''
      if ((l % 2) == 0):
          isEven = True
      else:
          isEven = False
      for i in range(0, l, 2):
          if isEven:
              s1 = (s[i] + s1)
              s1 += s[(i + 1)]
          elif ((l - i) > 1):
              s1 += s[i]
              s1 = (s[(i + 1)] + s1)
          else:
              s1 += s[i]
      return s1
source_cpp: string decode_median_string_original_string(string s) {
    int l = s . length ( );
    string s1 = "";
    bool isEven = ( l % 2 == 0 ) ? true : false;
    for ( int i = 0;
    i < l;
    i += 2 ) {
      if ( isEven ) {
        s1 = s [ i ] + s1;
        s1 += s [ i + 1 ];
      }
      else {
        if ( l - i > 1 ) {
          s1 += s [ i ];
          s1 = s [ i + 1 ] + s1;
        }
        else {
          s1 += s [ i ];
        }
      }
    }
    return s1;
  }