Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<iomanip>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<math.h>
#include<stdlib.h>
#include<time.h>

#define pi acos(-1.0)
#define eps 1e-9
#define lup1(i,a,b,c) for(int i=a;i<b;i+=c)
#define lup2(i,a,b,c) for(int i=a;i<=b;i+=c)
#define lup3(i,a,b,c) for(int i=a;i>b;i-=c)
#define lup4(i,a,b,c) for(int i=a;i>=b;i-=c)
#define max(a,b) ((a>b)?a:b)
#define Max(a,b,c) max(max(a,b),c)
#define min(a,b) ((a>b)?b:a)
#define Min(a,b,c) min(min(a,b),c)
#define clear(a) memset(a,0,sizeof(a))
#define settrue(a) memset(a,true,sizeof(a))
#define setfalse(a) memset(a,false,sizeof(a))
#define open freopen("inp.txt","r",stdin)
#define close freopen ("out.txt","w",stdout)
#define Case(a) printf("Case %d: ",a)
#define Case_h(a) printf("Case #%d: ",a)
#define ll long long
#define ull unsigned long long

using namespace std;



int main(){
    string s;
    int i,j;
    while (getline(cin,s))
    {
        int k = s.length();
        lup1(i,0,k,1)
        {
            if((s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z'))
            {
                if(s[i] =='a')s[i] = 'w';
                else if(s[i] == 'A')s[i] = 'W';
                else if(s[i] == 'b')s[i] = 'x';
                else if(s[i] == 'B')s[i] = 'X';
                else if(s[i] == 'c')s[i] = 'y';
                else if(s[i] == 'C')s[i] = 'Y';
                else if(s[i] == 'd')s[i] = 'z';
                else if(s[i] == 'D')s[i] = 'Z';
                else s[i] -= 4;
            }
        }
        cout << s << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>
#include <vector>

using namespace std;


int main(){

	string line;

	while(getline(cin, line)){

		string str[80], ans[80];
		int count = 0;
		int flag = 0;
		int slide;

		//???????????????
		/*
		string temp;
		for(int i=0 ; i<line.size()-1 ; i++){
			temp += line[i];
		}
		line = temp;
		*/
		

		//???????????????????????¨???????´?
		for(int i=0 ; i<line.size() ; i++){
			if(line[i] == ' '){
				count++;
			}else{
				str[count] += line[i];
				ans[count] = str[count];
			}
		}
		count++;


		for(int i=1 ; i<=26 ; i++){
			for(int j=0 ; j<count ; j++){
				for(int k=0 ; k<str[j].size() ; k++){
					if(str[j][k] >= 'a' && str[j][k] <= 'z'){
						str[j][k]++;
						if(str[j][k] > 'z'){
							str[j][k] = str[j][k] - 'z' + 'a' -1;
						}
					}
					if(str[j][k] == 'h' && str[j][k-1] == 't'){
						flag = 1;
						slide = i;
						break;
					}
				}

				/*
				if(str[j] == "this" || str[j] == "the" || str[j] == "that"
						|| str[j] == "this." || str[j] == "the." ||str[j] == "that."){
					flag = 1;
					slide = i;
					break;
				}
				*/
				if(flag == 1)break;
			}
			if(flag == 1)break;
		}

		for(int i=0 ; i<count ; i++){
			for(int j=0 ; j<ans[i].size() ; j++){
				if(ans[i][j] >= 'a' && ans[i][j] <= 'z'){
					if((ans[i][j] + slide) > 'z' ){
						ans[i][j] = ans[i][j] - 'z' + 'a' + slide -1;
					}else{
						ans[i][j] = ans[i][j] + slide ;
					}
				}
			}
		}

		//cout << ans[0] << endl;

		for(int i=0 ; i<=count ; i++){
			cout << ans[i];
			if(i < count) cout << ' ';
		}
		//cout << endl;

	}
	return 0;
}

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

int main() {
	string from;
	while (getline(cin,from)) {
		for (int j = 1; j <= 26; j++) {
			for (int i = 0; i < from.size(); i++) {
				if (from[i] != '.'&&from[i] != ' ') {
					if (from[i] + 1 > 122)from[i] = from[i] + 1 - 26;
					else from[i] = from[i] + 1;
				}
			}
				if ((int)from.find("the") != -1)break;
				if ((int)from.find("this") != -1)break;
				if ((int)from.find("that") != -1)break;
		}
		cout << from << endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
 
int main(void){
    int i, j, k;
    char s[81];
    while (fgets(s, 81, stdin) != 0){
        char t[3][5] = { "the", "this", "that" };
        for (i = 1; i<27; i++){
            for (j = 0; j<3; j++){
                for (k = 0; k<strlen(t[j]); k++)
                    t[j][k] = (t[j][k] - 'a' + 1) % 26 + 'a';
                if (strstr(s, t[j]) != 0){
                    for (j = 0; j<strlen(s); j++)
                        if ('a' <= s[j] && s[j] <= 'z')
                            for (k = 0; k<i; k++)
                                s[j] += 26 * (s[j] - 'a' - 1<0) - 1;
                    printf("%s", s);
                    break;
                }
            }
            if (j != 3)
                break;
        }
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c - 'a' + 25) % 26 + 'a';
    }
}

int main()
{
    string s;

    while (getline(cin, s)) {
        if (!s) break;
        while (s.find("the") == string::npos || s.find("this") == string::npos || s.find("that") == string::npos) f(s);
        cout << s << endl;
    }
}

C++: #include <bits/stdc++.h>
 
using namespace std;
 
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
 
int main() {
    string s;
    while(getline(cin, s)){
    	rep(i, 26) {
	    	rep(j, s.size()) {
	            if('a' <= s[j] && s[j] <= 'z') s[j] = s[j] + 'a';
	            else s[j] = 'a';
	        }
	        if(s.find("the") != string::npos || s.find("this") != string::npos || s.find("that") != string::npos){
                cout << s << endl;
            }
	    }
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(void){
	string s;
	while(getline(cin,s)){
		while(s.find("this")==s.npos&&s.find("that")==s.npos&&s.find("the")==s.npos)
			for(int i=0;i<(int)s.length();i++){
				if(s[i]>'z'||s[i]<'a')continue;
				if(s[i]!='z')s[i]++;
				else s[i]='a';
			}
		cout<<s<<endl;
	}
}

C++: #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;
}