Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

C++: #include <stdio.h>
using namespace std;
int main() {
	string w[3]={"the","this","that"},st;
	int wn[3]={3,4,4},k,i,j,s,f;
	while(true) {
    k=0; 
	getline(cin,st);
	while(k<st.size()) {
		for (i=0;i<3;i++) {
			s=0; f=0;
			if (st.size()<k+wn[i]) break;
			for (j=0;j<wn[i]-1;j++) if ((w[i][j]-w[i][j+1])==(st[k+j]-st[k+j+1])) s++;
			if (s==wn[i]-1)  { f=1; i=5;}
		}
		if (f==1) break;
		for (k;st[k]>='a' && st[k]<='z' && k<80; k++);
		k++;
	}
	if (f==0) cout << st; else {
		for (i=0;i<st.size();i++) 
			if ((st[i]>='a' && st[i]<='z')) cout << (char)(((st[i]-st[k]+'t')-97+26) % 26 + 97) ; 
		    else cout << st[i];
	}
	cout << endl;
	}
	return 0;
	}

C++: #include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

string f(const string& s, int k) {
    string t;
    rep (i, s.size()) {
        if (islower(s[i])) t += (char)((s[i]-'a'+k)%26+'a');
        else t += s[i];
    }
    return t;
}

bool ok(const string& t) {
    if (t.find("the") != string::npos) return true;
    if (t.find("this") != string::npos) return true;
    if (t.find("that") != string::npos) return true;
    return false;
}

int main() {
    string s;
    while (getline(cin, s)) {
        if (s.size() > 0 && s[s.size()-1] == '\r') s.resize(s.size()-1);
        rep (i, 26) {
            const string t = f(s, i);
            if (ok(t)) {
                cout << t << endl;
                break;
            }
        }
    }
    return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdio>
#include <cctype>
#define N 100
using namespace std;

void hukugou(char str2[]){
  int i;

  while(1){

    for(i = 0;str2[i] != '\0';i++){
      if(str2[i] != ' ' && str2[i] != '\n' && str2[i] != '.'){
	str2[i] = (str2[i] - 'a' + 1) % 26 + 'a';
      }
    }

    if(strstr(str2, "the") != NULL || strstr(str2, "this") != NULL || strstr(str2, "that") != NULL){
      cout << str2;
      break;
    }
  }

}

int main(){
  char str[N];

  fgets(str, sizeof(str), stdin);

  hukugou(str);

  return 0;
}

C++: #define scanf_s scanf
#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
#define ABC 26
int main(void)
{
	int n, s = 0, x, y, r = 0, d;
	int sum_n[50][3] = { 0 };
	char str[MAX];
	while (gets_s(str) != NULL) {
		for (int i = 0; str[i] != '\0'; ++i) {
			if (str[i] - 't' == str[i + 1] - 'h') {
				d = str[i] - 't';
				if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
				else if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a' && (str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
				else if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a' && (str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
			}
		}
		for (int i = 0; str[i] != '\0'; ++i) {
			if ('a' <= str[i] && str[i] <= 'z') {
				printf("%c", (str[i] - 'a' - d + ABC) % ABC + 'a');
			}
			else { printf("%c", str[i]); }
		}
		printf("\n");
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <cstring>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
    string s;
    while(getline(cin, s)){
        rep(i, 26){
            for(char& c : s){
                if(isalpha(c)){
                    if(c != 'z') ++c;else c = 'a';
                }
            }
            if(s.find("that") != string::npos || s.find("this") != string::npos || s.find("the") != string::npos){
                cout << s << endl;
            }
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

bool find(string str, string can) {
  string tmp_can = ' ' + can + ' ';
  string tmp_str = ' ' + str + ' ';
  for (int i = 0; i < tmp_str.length(); ++i) {
    if (string::npos != tmp_str.find(tmp_can, i)) {
      return true;
    }
  }
  return false;
}

int main() {
  string str;
  string candies[] = {"this", "the", "that"};
  while(getline(cin, str)) {
  for (int m = 0; m < 25; ++m) {
    for (int i = 0; i < str.length(); ++i) {
      if (str[i] == ' ') {
        continue;
      }
      if (str[i] == ',' || str[i] == '.') {
        str[i] = ' ';
        continue;
      }
      int char_id = static_cast<int>(str[i]) - 97;
      int shifted = static_cast<int>(char_id + 1);
      str[i] = static_cast<char>(shifted % 26 + 97);
    }
    cout << str << endl;
    for (int i = 0; i < sizeof(candies) / sizeof(candies[0]); ++i) {
      if (find(str, candies[i])) {
        cout << "!!!" << endl;
        break;
      }
    }
  }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
string str;	
int a, b, c, d;
int main(){
	while(getline(cin, str)){
		a = str.length();
		for(int i = 0; i < a; i++){
			if(str[i] < 97 || str[i] > 122){
				cout << str[i];
			}
			else {
				b = (int)str[i];
				b = b - 4;
				if(b < 97)
					b = b + 26;
				cout << (char)b;
			}
		}
		cout << endl;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
using namespace std;

int main(){
	int gap = 0;
	string s;
	getline(cin, s);
	for (int i = 0; i < 3; ++i) {
		for (int j = 0; j < 'z' - 'a' + 1; ++j) {
			string cs;
			if (i == 0) cs = "the";
			if (i == 1) cs = "that";
			if (i == 2) cs = "this";
			for (int k = 0; k < cs.length(); ++k) {
				int sum;
				sum = (cs[k] - 'a' + j) % ('z' - 'a' + 1);
				cs[k] = 'a' + sum;
			}
			if (s.find(cs) != string::npos) {
				gap = j;
				break;
			}
		}
		if (gap != 0) break;
	}
	for (int i = 0; i < s.length(); ++i) {
		if ('a' <= s[i] && s[i] <= 'z') {
			int sum;
			sum = (s[i] - 'a' - gap + 'z' - 'a' + 1) % ('z' - 'a' + 1);
			s[i] = sum + 'a';
		}
	}
	cout << s << endl;
	return 0;
}