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>
#include <string.h>

char buf[99];

int main(){
    int i;

    for(;~scanf("%[^\n] ",buf);){
        for(i=0; i<100; i++){
            if( buf[i]-buf[i+1] == 12 ){
                break;
            }
        }
        int sa = buf[i] - 't';
        for(i=0; buf[i]!='\0'; i++){
            buf[i]=!putchar( buf[i] - (97>buf[i] ? 0: sa) );
        }
        puts("");
    }
    return 0;
}

C++: #include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int main(){

    char a[1000];
    while(scanf("%[^\n]",a) != EOF){
        getchar();
        bool flg = 0;
        for(int i = 1; i < 26; i++){
            unsigned char ans[1000] = {0};
            for(int j = 0; j < strlen(a); j++){
                if(a[j] == ' ' || a[j] == '.') ans[j] = a[j];
                else ans[j] = a[j] + i;
                if(ans[j] > 'z') ans[j] -= 26;
            }
            for(int j = 0; j < strlen(a); j++){
                if(ans[j] == 't' && ans[j+1] == 'h'){
                    if(ans[j+2] == 'e' && ans[j+3] == ' ' || ans[j+3] == 0 || ans[j+3] == '.')flg = 1;
                    if(ans[j+2] == 'i' && ans[j+3] == 's' && ans[j+4] == ' ' || ans[j+4] == 0 || ans[j+4] == '.')flg = 1;
                    if(ans[j+2] == 'a' && ans[j+3] == 't' && ans[j+4] == ' ' || ans[j+4] == 0 || ans[j+4] == '.')flg = 1;
                }
                if(flg){
                    if(j == 0){
                        cout << ans << endl;
                        goto end;
                    }
                    else{
                        if(ans[j-1] == ' '){
                            cout << ans << endl;
                            goto end;
                        }
                    }
                }
            }
        }
        end:;
        for(int i = 0;i < 1000; i++) a[i] = 0;
    }

    return 0;
}

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

int main(void)
{
	string str;
	while (getline(cin, str))
	{
		while (str.find("the") == -1 && str.find("this") == -1 && str.find("that") == -1)
		{
			for (int i = 0; i < str.size(); i++)
			{
				if ('a' <= str[i] && str[i] < 'z') str[i]++;
				else if (str[i] == 'z') str[i] = 'a';
			}
		}
		cout << str << endl;
	}
	return 0;
}

C++: #include<string>
#include<iostream>
#include<algorithm>
using namespace std;
string henkan(string a)
{
	for (int i = 0; i < a.size(); i++)
	{
		if (a[i] != ' '&&a[i] != '.')
		{
			if (a[i] == 'z')a[i] = 'a';
			else 
				a[i] += 1;
		}
	}
	return a;
}
bool check(string a)
{
	string x[3] = { "the", "this", "that" };
	for (int i = 0; i < 3; i++)
	{
		if (a.find(x[i], 0) != string::npos)return false;
	}
	return true;
}
int main()
{
	
	string a, b;
	cin >> b;
	a.append(b);
	while (cin>>b)
	{
		a.append(" ");

		cin >> b;
		a.append(b);
	}
	while (check(a))
	{
		a = henkan(a);
	}
	cout << a << endl;
	
}

C++: #include <iostream>
#include <string>

using namespace std;

int main()
{
    string s;

    while (getline(cin, s)) {
        while (s.find("the") == s.npos &&
                    s.find("this") == s.npos &&
                    s.find("that") == s.npos) {
            for (int i = 0; i < s.size(); i++) {
                if ('a' <= s[i] && s[i] <= 'y') {
                    s[i]++;
                } else if (s[i] == 'z') {
                    s[i] = 'a';
                }
            }
        }
        cout << s << endl;
    }

    return 0;
}

C++: #include <iostream> // C++の入出力
#include <stdio.h> // C の入出力
#include <algorithm> // sort などのアルゴリズム
#include <string.h> // C の文字列用
#include <ctype.h> // C の文字種用
#include <string> // C++の文字列
#include <math.h>
using namespace std;
int main(void){
    string in;
    string hyou="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
    string kkk=" .",sen="th",sen1="eisat";
    while(getline(cin,in)){
        for(int s=1;s<=26;s++){
            string out="";
            for(int i=0;i<in.length();i++){
                if(in[i]==kkk[0]||in[i]==kkk[1]){
                    out+=in[i];
                }
                for(int k=0;k<26;k++){
                    if(in[i]==hyou[k]){
                        out+=hyou[k+s];
                        break;
                    }
                }
            }
            bool sw=0;
            for(int i=0;i<out.length();i++){
                if(out[i]==sen[0]&&out[i+1]==sen[1]){
                    if(out[i+2]==sen1[0]){
                        sw=1;
                        cout<<out<<endl;
                        break;
                    }else if(out[i+2]==sen1[1]&&out[i+3]==sen1[2]){
                        sw=1;
                        cout<<out<<endl;
                        break;
                    }else if(out[i+2]==sen1[3]&&out[i+3]==sen1[4]){
                        sw=1;
                        cout<<out<<endl;
                        break;
                    }
                }
            }
            if(sw==1)break;
        }
    }
    return 0;
}

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

int main(){
	string str[1000];
	int k = 0;
	int zure[1000];
	bool flag[1000] = {false};
	while(getline(cin, str[k])){
		for(int j = 0; j < 26; j++){
			for(int i = 0; i < str[k].size()-2; i++){
				if(str[k][i] == 'a'+('t'+j-'a')%26 && str[k][i+1] == 'a'+('h'+j-'a')%26 && str[k][i+2] == 'a'+('e'+j-'a')%26){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
			for(int i = 0; i < str[k].size()-3; i++){
				if(str[k][i] == 'a'+('t'+j-'a')%26 && str[k][i+1] == 'a'+('h'+j-'a')%26 && str[k][i+2] == 'a'+('i'+j-'a')%26 && str[k][i+3] == 'a'+('s'+j-'a')%26){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
			for(int i = 0; i < str[k].size()-3; i++){
				if(str[k][i] == 'a'+('t'+j-'a')%26 && str[k][i+1] == 'a'+('h'+j-'a')%26 && str[k][i+2] == 'a'+('a'+j-'a')%26 && str[k][i+3] == 'a'+('t'+j-'a')%26){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
		}
	}
	for(int j = 0; j < k; j++){
		for(int i = 0; i < str[j].size(); i++){
			if(str[j][i] >= 'a' && str[j][i] <= 'z'){
				str[j][i] = str[j][i]-zure[j];
				if(str[j][i] < 'a'){
					str[j][i] = str[j][i]+26;
				}
			}
		}
		cout << str[j] << endl;
	}
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <regex>

using namespace std;

string decode(string inp,int n){
    for(int i=0;i<inp.length();i++){
        if('a'<=inp[i]&&inp[i]<='z'){
            if(inp[i]-n<'a'){
                inp[i]='z'-(n-(inp[i]-'a')-1);

            }else{
                inp[i]=inp[i]-n;
            }
        }
    }
    return inp;
}
int main(){
    string input,decoded;
    regex pattern("(the)|(this)|(that)");
        for(int i=0;i<26;i++){
            decoded=decode(input,i);
            if(regex_search(decoded.begin(),decoded.end(),pattern)){
                break;
            }
        }
        cout << decoded << endl;
    return 0;
}