alexjercan/bugnet huggingface dataset:
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>
using namespace std;

int main() {
  string s, strCopy;
  while (getline(cin, s)) {
    for (int j = 0; j < 26; j++) {
      for (int i = 0; i < s.size(); i++) {
        if (s[i] >= 'a' && s[i] <= 'z') {
          s[i] = (s[i] == 'z') ? 'a' : s[i] + 1;
        }
      }
      if (s.find("the") != string::npos || s.find("this") != string::npos ||
          s.find("that") != string::npos) {
        cout << s << endl;
      }
    }
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>
using namespace std;

int main() {
  string in;
  int g = 0;
  getline(cin, in);
  while (1) {
    string t[3] = {"the", "that", "this"};
    for (int j = 0; j < 3; j++)
      for (int i = 0; i < 4; i++)
        t[j][i] += g;

    if (in.find(t[0]) == string::npos || in.find(t[1]) == string::npos ||
        in.find(t[2]) == string::npos) {
      g++;
      continue;
    } else
      break;
  }
  for (int i = 0; i < in.size(); i++) {
    char t = in[i];
    if (t == ' ' || t == '.' || t == ',')
      cout << t;
    else
      cout << (char)(in[i] - g);
  }
  cout << endl;
  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>

using namespace std;
int main(void) {
  while (1) {
    char a[10000] = {0};
    if (gets(a) == NULL)
      break;
    int as = strlen(a);
    for (int i = 0; i < 26; i++) {
      if (strstr(a, "this") || strstr(a, "that") || strstr(a, "the"))
        break;
      for (int j = 0; j < as; j++) {
        if (isalpha(a[j]) != 0) {
          if (a[j] < 'z') {
            a[j]++;
          } else {
            a[j] = 'a';
          }
        }
      }
    }
    printf("%s\\n", a);
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <cstdio>
#include <cstring>

using namespace std;
int main(void) {
  char a[1000] = {0};
  int i, j;
  while (scanf("%[^\\n]", a) != EOF) {
    int as = strlen(a);
    for (i = 0; i < 26; i++) {
      if (strstr(a, "this") || strstr(a, "that") || strstr(a, "the"))
        break;
      for (j = 0; j < as; j++) {
        if (a[j] != 46 || a[j] != 32) {
          if (a[j] >= 'z') {
            a[j] = 'a';
          } else {
            a[j]++;
          }
        }
      }
    }
    printf("%s\\n", a);
  }
  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>
// #include <string.h>
using namespace std;
int main() {
  char alpha[] = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
  string str;
  while (1) {
    if (getline(cin, str).eof())
      break;
    for (int a = 0; a < 26; a++) {
      for (size_t i = 0; i < str.length(); i++) {
        for (size_t j = 0; j < sizeof(alpha); j++) {
          if (str[i] == alpha[j]) {
            str[i] = alpha[j + 1];
            break;
          }
        }
      }
      /*char word = strtok( str.c_str(), " " );
      if( word == "the" || word == "that" || word == "this" ) break;
      while( word == NULL ){
              word = strtok( NULL, ' ' );
              if( word == "the" || word == "that" || word == "this" ) goto end;
      }*/
      if (str.find("the") != string::npos || str.find("this") != string::npos ||
          str.find("that") != string::npos) {
        break;
      }
    }
    cout << str << endl;
  }
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main() {
  string alpha = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
  while (1) {
    string str;
    getline(cin, str);
    for (int a = 0; a < 26; a++) {
      for (int i = 0; i < str.length(); i++) {
        for (int j = 0; j < alpha.length(); j++) {
          if (str[i] == alpha[j]) {
            str[i] = alpha[j + 1];
            break;
          }
        }
      }
      /*char word = strtok( str.c_str(), " " );
      if( word == "the" || word == "that" || word == "this" ) break;
      while( word == NULL ){
              word = strtok( NULL, ' ' );
              if( word == "the" || word == "that" || word == "this" ) goto end;
      }*/
      if (str.find("the") != string::npos || str.find("this") != string::npos ||
          str.find("that") != string::npos) {
        break;
      }
    }
    cout << str << endl;
  }
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>
using namespace std;

int main() {
  string s;

  while (getline(cin, s)) {
    int flag = 0;

    while (true) {
      for (int i = 0; i < s.length(); i++) {
        string key1 = s.substr(i, 3), key2 = s.substr(i, 4);
        if (key1 == "the" || key2 == "this" || key2 == "that") {
          flag = 1;
        }
      }

      if (flag) {
        break;
      } else {

        for (int i = 0; i < s.length(); i++) {
          if (s[i] >= 'a' && s[i] <= 'z') {
            // s[i] -= 'a';
            // s[i] += 1;
            // s[i] = s[i]%('A'-'a');
            // s[i] += 'a';

            s[i] -= 'a' - 'A';
            s[i] = (char)('A' + (s[i] - 'A' + 26 + 1) % 26);
            s[i] += 'a' - 'A';

          } else {
            continue;
          }
        }
      }
    }
    cout << s << endl;
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>
#include <string>
using namespace std;

int main() {
  string s;

  while (getline(cin, s)) {
    int flag = 0;

    while (true) {

      for (int i = 0; i < s.length(); i++) {

        string key1 = s.substr(i, 3);
        string key2 = s.substr(i, 4);
        if (key1 == "the" || key2 == "this" || key2 == "that") {
          flag = 1;
        }
      }

      if (flag) {
        break;
      } else {

        for (int i = 0; i < s.length(); i++) {
          if (s[i] >= 'a' && s[i] <= 'z') {
            // s[i] -= 'a';
            // s[i] += 1;
            // s[i] = s[i]%('A'-'a');
            // s[i] += 'a';

            s[i] -= 'a' - 'A';
            s[i] = ('A' + s[i] - 'A' + 26 + 1) % 26;
            s[i] += 'a' - 'A';

          } else {
            continue;
          }
        }
      }
    }
    cout << s << endl;
  }
  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>
using namespace std;

int main() {
  string str;

  while (getline(cin, str)) {
    int flg = 0;

    while (true) {
      for (int i = 0; i < str.length(); i++) {
        string key1 = str.substr(i, 3), key2 = str.substr(i, 4);
        if (key1 == "the" || key2 == "that" || key2 == "this")
          flg = 1;
      }

      if (flg)
        break;
      else {
        for (int j = 0; j < str.length(); j++) {
          if ('a' <= str[j] && str[j] <= 'z') {
            str[j] -= 'a' - 'A';
            str[j] = (char)('A' + (str[j] - 'A' + 26 + 1) % 26);
            str[j] += 'a' - 'A';
          } else
            continue;
        }
      }
    }
    cout << str << endl;
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;

void coding() {
  string s;

  while (getline(cin, s)) {
    bool flag = false;

    while (true) {

      for (int i = 0; i < s.length(); i++) {

        string key1 = s.substr(i, 3);
        string key2 = s.substr(i, 4);
        if (key1 == "the" || key2 == "this" || key2 == "that") {
          flag = true;
        }
      }

      if (flag) {
        break;
      } else {

        for (int i = 0; i < s.length(); i++) {
          if (s[i] > 'a' && s[i] < 'z') {
            s[i] -= 'a';
            s[i] += 1;
            s[i] = s[i] % ('A' - 'a');
            s[i] += 'a';
          } else {
            continue;
          }
        }
      }
    }
    cout << s << endl;
  }
}

int main() { coding(); }
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
int main() {
  string s;
  for (; getline(cin, s);) {
    bool f = 0;
    for (; !f;) {
      for (int i = 0; i < s.size(); i++) {
        if (s[i] >= 'a' && s[i] <= 'z') {
          s[i]--;
          if (s[i] < 'a')
            s[i] = 'z';
        }
      }
      string t[3] = {"the", "this", "that"};
      for (int i = 0; !f && i < 3; i++) {
        for (int j = 0; !f && j + t[i].size() < s.size(); j++) {
          if (s.substr(j, t[i].size()) == t[i]) {
            cout << s << endl;
            f = 1;
          }
        }
      }
    }
  }
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  string s;
  for (; getline(cin, s);) {
    cin.ignore();
    bool f = 0;
    for (; !f;) {
      for (int i = 0; i < s.size(); i++) {
        if (s[i] >= 'a' && s[i] <= 'z') {
          s[i]--;
          if (s[i] < 'a')
            s[i] = 'z';
        }
      }
      string t[3] = {"the", "this", "that"};
      for (int i = 0; !f && i < 3; i++) {
        for (int j = 0; !f && j + t[i].size() < s.size(); j++) {
          if (s.substr(j, t[i].size()) == t[i]) {
            cout << s << endl;
            f = 1;
          }
        }
      }
    }
  }
}
Problem p00017 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
#include <string>
using namespace std;

int main() {
  string s, strCopy;
  while (getline(cin, s)) {
    for (int j = 0; j < 26; j++) {
      for (int i = 0; i < s.size(); i++) {
        if (s[i] >= 'a' && s[i] <= 'z') {
          s[i] = (s[i] == 'z') ? 'a' : s[i] + 1;
        }
      }
      if (s.find("the") != string::npos || s.find("this") != string::npos ||
          s.find("that") != string::npos) {
        cout << s << endl;
      }
    }
  }

  return 0;
}

Error: 0

Fixed submission:

#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;

int checkCaesarChipher(string str1, string str2) {
  int a[1000], b[1000];
  bool flag = false;

  for (unsigned int i = 0; i < str1.size() - 1; i++) {
    a[i] = (str1[0] - str1[i] + 26 - 'a') % 26;
    b[i] = (str2[0] - str2[i] + 26 - 'a') % 26;
    if (a[i] == b[i]) {
      flag = true;
    } else {
      flag = false;
      break;
    }
  }
  if (flag) {
    return (str2[0] - str1[0]);
  } else {
    return 0;
  }
}

int main() {
  string str, hoge, key;
  char s[80];
  int j = 0, ans = 0;

  while (getline(cin, str)) {
    for (int i = 0; i < str.size(); ++i) {
      ans = 0;
      if (str[i] == ' ' || i == str.size() - 1) {
        if (i == str.size() - 1) {
          hoge = str.substr(j, i - j + 1);
        } else {
          hoge = str.substr(j, i - j);
        }
        j = i + 1;

        if (hoge.size() == 3) {
          key = "the";
          if (checkCaesarChipher(key, hoge) != 0) {
            ans = checkCaesarChipher(key, hoge);
            break;
          }
        }
        if (hoge.size() == 4) {
          key = "that";
          if (checkCaesarChipher(key, hoge) != 0) {
            ans = checkCaesarChipher(key, hoge);
            break;
          }
          key = "this";
          if (checkCaesarChipher(key, hoge) != 0) {
            ans = checkCaesarChipher(key, hoge);
            break;
          }
        }
      }
    }
    if (ans != 0) {
      for (int i = 0; i < str.size(); i++) {
        if (str[i] >= 'a' && str[i] <= 'z') {
          str.at(i) -= ans;
        }
      }
      cout << str << endl;
    }
  }
  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <iostream>
#include <string>

using namespace std;

string decode(string s, int v) {
  string ans = s;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      ans[i] = (s[i] + v) % 26 + 'a';
    }
  }
  return ans;
}

int main() {
  string s;
  while (getline(cin, s)) {
    for (int i = 0; 26; i++) {
      string tmp = decode(s, i);
      if (tmp.find("this") != string::npos || tmp.find("the") != string::npos ||
          tmp.find("that") != string::npos) {
        cout << tmp << endl;
        break;
      }
    }
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <iostream>
#include <string>

using namespace std;

string dict = "abcdefghijklmnopqrstuvxwyz";

string decode(string s, int v) {
  string ans = s;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      ans[i] = dict[((s[i] + v) % 26)];
    }
  }
  return ans;
}

int main() {
  string s;

  while (getline(cin, s)) {
    if (s.size() <= 1)
      break;
    for (int i = 1;; i++) {
      string tmp = decode(s, i);
      if (tmp.find("this") != string::npos && tmp.find("the") != string::npos &&
          tmp.find("that") != string::npos) {
        cout << tmp << endl;
        break;
      }
    }
  }
  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;

#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back

char sub(char ch) {
  if (ch == 'a')
    return 'z';
  else
    return ch - 1;
}

bool solve(string s) {
  string tmp = "";
  rep(i, s.size()) {
    if (isalpha(s[i])) {
      tmp += s[i];
    } else {

      if (tmp == "the" || tmp == "this" || tmp == "that")
        return true;

      tmp = "";
    }
  }
  return false;
}

int main() {
  string s;
  while (getline(cin, s)) {
    while (1) {
      rep(i, s.size()) {
        if (isalpha(s[i]))
          s[i] = sub(s[i]);
      }
      if (solve(s))
        break;
    }
    cout << s << endl;
  }
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define INF 100000000

using namespace std;
typedef long long ll;

string change(string s) {
  int len = s.size();
  for (int i = 0; i < len; i++) {
    if ('b' <= s[i] && s[i] <= 'z')
      s[i]--;
    if (s[i] == 'a')
      s[i] = 'z';
  }
  return s;
}

bool check(string s) {
  int len = s.size();
  string tan = "";
  for (int i = 0; i < len; i++) {
    if ('a' <= s[i] && s[i] <= 'z') {
      tan += s[i];
    } else {
      if (tan == "the" || tan == "this" || tan == "that")
        return true;
      tan = "";
    }
  }
  return false;
}

int main() {
  string s;
  getline(cin, s);
  while (1) {
    s = change(s);
    if (check(s)) {
      cout << s << endl;
      return 0;
    }
  }

  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>
using namespace std;
int main() {
  string line;
  while (getline(cin, line)) {
    while (line.find("the") == string::npos &&
           line.find("this") == string::npos &&
           line.find("that") == string::npos)
      for (auto &c : line)
        if (c == 'a')
          c = 'z';
        else if (c != '.' && c != ' ')
          c -= 1;
    cout << line << endl;
  }
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>
using namespace std;
void slide(string &s) {
  for (auto &c : s)
    if (c == 'a')
      c = 'z';
    else if (c != '.' && c != ' ')
      c -= 1;
}
bool check(const string &s) {
  if (s.find("the") == string::npos || s.find("this") == string::npos ||
      s.find("that") == string::npos)
    return true;
  return false;
}
int main() {
  string line;
  while (getline(cin, line)) {
    while (check(line))
      slide(line);
    cout << line << endl;
  }
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>

bool NotMatch(const std::string &str) {
  return str.find("the") == std::string::npos &&
         str.find("this") == std::string::npos &&
         str.find("that") == std::string::npos;
}

int main() {
  std::string str;
  while (getline(std::cin, str)) {
    while (NotMatch(str)) {
      for (unsigned i = 0; i < str.length(); ++i) {
        if (str[i] == '.' || str[i] == ' ' || str[i] == '\\n') {
          continue;
        }

        if (str[i] == 'z') {
          str[i] = 'a';
        } else {
          ++str[i];
        }
      }
    }

    std::cout << str << '\\n';
  }
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>

bool NotMatch(const std::string &str) {
  return str.find("the") == std::string::npos &&
         str.find("this") == std::string::npos &&
         str.find("that") == std::string::npos;
}

int main() {
  std::string str;
  while (getline(std::cin, str)) {
    while (NotMatch(str)) {
      for (unsigned i = 0; i < str.length(); ++i) {
        if (str[i] == '.' || str[i] == ' ' || str[i] == '\\n') {
          continue;
        }

        if (str[i] == 'z') {
          str[i] = 'a';
        } else {
          --str[i];
        }
      }
    }

    std::cout << str << '\\n';
  }
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>

#define int64 long long int

using namespace std;

char *caesar(char *);

int main() {
  int i, c;
  char str[128];

  i = 0;
  while ((c = getchar()) != EOF) {
    if (c != '\\n') {
      str[i] = c;
      i++;
    } else {
      str[i] = 0;
      cout << caesar(str) << '\\n';
      i = 0;
    }
  }

  return 0;
}

char *caesar(char *str) {
  int len, i;
  len = strlen(str);
  while (1) {
    for (i = 0; i < len; i++) {
      if (str[i] >= 'b' && str[i] <= 'z')
        str[i]--;
      else if (str[i] == 'a')
        str[i] = 'z';
    }
    for (i = 0; i < len; i++) {
      if (str[i] == 't' && str[i + 1] == 'h') {
        if (str[i + 2] == 'e' || (str[i + 2] == 'i' && str[i + 3] == 's') ||
            (str[i + 2] == 'a' && str[i + 3] == 't'))
          return str;
      }
    }
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>

#define int64 long long int

using namespace std;

char *caesar(char *);

int main() {
  int i, c;
  char str[128];

  while (1) {
    for (i = 0;; i++) {
      c = getchar();
      if (c == '\\n' || c == EOF)
        break;
      str[i] = c;
    }
    str[i] = 0;
    cout << caesar(str) << '\\n';

    if (c == EOF)
      break;
  }

  return 0;
}

char *caesar(char *str) {
  int len, i;
  len = strlen(str);
  while (1) {
    for (i = 0; i < len; i++) {
      if (str[i] >= 'b' && str[i] <= 'z')
        str[i]--;
      else if (str[i] == 'a')
        str[i] = 'z';
    }
    for (i = 0; i < len; i++) {
      if (str[i] == 't' && str[i + 1] == 'h') {
        if (str[i + 2] == 'e' || (str[i + 2] == 'i' && str[i + 3] == 's') ||
            (str[i + 2] == 'a' && str[i + 3] == 't'))
          return str;
      }
    }
  }
  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

using namespace std;

#define REP(i, a, b) for ((i) = (a); (i) < (int)(b); (i)++)
#define rep(i, n) REP(i, 0, n)
// BEGIN CUT HERE
#define foreach(itr, c)                                                        \\
  for (typeof((c).begin()) itr = (c).begin(); itr != (c).end(); itr++)
template <class T> inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
// END CUT HERE

int main() {
  string str;

  while (getline(cin, str)) {
    int i, N = str.size();

    while (1) {
      rep(i, N) if ('a' <= str[i] && str[i] <= 'z') {
        str[i]--;
        if (str[i] < 'a')
          str[i] = 'z';
      }
      if (str.find("this") != -1 || str.find("the") != -1 ||
          str.find("that") != -1) {
        cout << str << endl;
        break;
      }
    }
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

using namespace std;

#define REP(i, a, b) for ((i) = (a); (i) < (int)(b); (i)++)
#define rep(i, n) REP(i, 0, n)
// BEGIN CUT HERE
#define foreach(itr, c)                                                        \\
  for (typeof((c).begin()) itr = (c).begin(); itr != (c).end(); itr++)
template <class T> inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
// END CUT HERE

int main() {
  string str;

  while (getline(cin, str)) {
    int i, N = str.size();

    while (1) {
      rep(i, N) if ('a' <= str[i] && str[i] <= 'z') str[i]--;
      if (str.find("this") != -1 || str.find("the") != -1 ||
          str.find("that") != -1) {
        cout << str << endl;
        break;
      }
    }
  }

  return 0;
}
Problem p00017 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <ctype.h>
#include <iostream>
#include <string>
using namespace std;

int main() {
  string before;
  while (getline(cin, before)) {
    int swich = 0;
    for (int i = 0; i < 27; i++) {
      for (int j = 0; j < before.size(); j++) {
        if (isalpha(before[j])) {
          before[j]++;
        }
        if (before[j] > 'z') {
          before[j] = 'a';
        }
      }
      for (int j = 0; j < before.size(); j++) {
        if (before[j] == 't' && before[j + 1] == 'h' && before[j + 2] == 'e') {
          if (before[j + 3] == ' ' || before[j + 3] == '.' ||
              before[j + 3] == '\\n') {
            swich = 1;
            break;
          }
        } else if (before[j] == 't' && before[j + 1] == 'h' &&
                   before[j + 2] == 'a' && before[j + 3] == 't') {
          if (before[j + 4] == ' ' || before[j + 4] == '.' ||
              before[j + 4] == '\\n') {
            swich = 1;
            break;
          }
        } else if (before[j] == 't' && before[j + 1] == 'h' &&
                   before[j + 2] == 'i' && before[j + 3] == 's') {
          if (before[j + 4] == ' ' || before[j + 4] == '.' ||
              before[j + 4] == '\\n') {
            swich = 1;
            break;
          }
        }
      }
      if (swich == 1) {
        break;
      }
    }
    cout << before << endl;
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <ctype.h>
#include <iostream>
#include <string>
using namespace std;

int main() {
  string before;
  while (getline(cin, before)) {
    int swich = 0;
    for (int i = 0;; i++) {
      for (int j = 0; j < before.size(); j++) {
        if (before[j] > 'z') {
          before[j] = 'a';
        } else if (isalpha(before[j])) {
          before[j]++;
        }
      }
      for (int j = 0; j < before.size(); j++) {
        if (before[j] == 't' && before[j + 1] == 'h' && before[j + 2] == 'e') {
          swich = 1;
          break;
        } else if (before[j] == 't' && before[j + 1] == 'h' &&
                   before[j + 2] == 'a' && before[j + 3] == 't') {
          swich = 1;
          break;
        } else if (before[j] == 't' && before[j + 1] == 'h' &&
                   before[j + 2] == 'i' && before[j + 3] == 's') {
          swich = 1;
          break;
        }
      }
      if (swich == 1) {
        break;
      }
    }
    cout << before << endl;
  }
  return 0;
}