Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back
#define F first
#define S second


typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

string convi(string s, int n) {
	string re;
	rep(i, sz(s)) {
		if (islower(s[i])) {
			int a = (int)(s[i]) + n;
			if (a > 122)a -= (a - 122 + 26 - 1) / 26 * 26;
			re += (char)a;
		}
		else {
			re += s[i];
		}
	}
	return re;
}

VS split(string str, char del) {
	VS re;
	string sub;
	for (char c : str) {
		if (c == del) {
			re.pb(sub);
			sub.clear();
		}
		else {
			sub += c;
		}
	}
	re.pb(sub);
	return re;
}

bool check(string s, string t) {
	string s2, t2;
	rep(i, sz(s)) {
		if (s[i] != '.')s2 += s[i];
	}
	rep(i, sz(t)) {
		if (t[i] != '.')t2 += t[i];
	}
	return s2 == t2;
}
int main() {
	string s;
	while (getline(cin, s)) {
		rep(i, 26) {
			string s2 = convi(s, i);
			VS sub = split(s2, ' ');
			VS ch = { "the","this","that" };
			bool flag = false;
			
			rep(j, sz(sub))rep(k, 3) {
				if (check(sub[j],ch[k]))flag = true;
			}

			if (flag) { cout << s2 << endl; break; }
		}
	}
}
/*
A:65
Z:90
a:97
z:122
*/

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

int main(void)
{
	string s;
	getline(cin, s);
	int diff='t'-s[0];

	for(int i=0; i<s.length(); i++)
	{
		if(s[i]!=' ' && s[i]!='.')
			s[i] += diff;
	}
	cout << s << endl;

	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>

using namespace std;
typedef long long ll;

int main(){
    int in;
    char S[1000];
    
    for(int i=0;;i++){
        
        in = getchar();
        
        if(in==EOF){
            S[i]='\0';
            break;
        }else{
            S[i]=(char)in;
        }
    }
    
    for(int k=0;;k++){
        
        bool f = false;
        
        for(int i=0;;i++){
            if('a'<=S[i] && S[i]<='y'){
                S[i]++;
            }else if(S[i]=='z'){
                S[i]='a';
            }
            
            if(i>=3 && !('a'<=S[i] && S[i]<='z')){
                if(S[i-3]=='t' && S[i-2]=='h' && S[i-1]=='e')
                    f=true;
            }
            if(i>=4 && !('a'<=S[i] && S[i]<='z')){
                if(S[i-4]=='t' && S[i-3]=='h')
                    if((S[i-2]=='i' && S[i-1]=='s') || (S[i-2]=='a' && S[i-1]=='t'))
                        f=true;
            }
            
            if(S[i]=='\0') break;
        }
        
        if(f) break;
    }
    
    for(int i=0;S[i]!='\0';i++)
        printf("%c",S[i]);
    
    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
  string str;
  while(getline(cin,str)){
    while(str.find("the")==-1&&str.find("this")==-1&&str.find("that")==-1){
      int i;
      for(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 <iostream>
#include <string>
using namespace std;
int main( void )
{
  string s;
  while( 1 ){
    getline( cin, s );
    if( cin.eof() ) break;
    while( 1 ){
      for( int i=0; i<s.size(); i++ ){
        if( s[i] == 'z' ) s[i] = 'a';
        else if( 'a' <= s[i] && s[i] < 'z' ) s[i]++;
      }
      if( s.find( "the",  0 ) != string::npos ){ cout << s << endl; break; }
      if( s.find( "this", 0 ) != string::npos ){ cout << s << endl; break; }
      if( s.find( "that", 0 ) != string::npos ){ cout << s << endl; break; }
    }
  }
  return 0;
}

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

int find_cnt;
string find_str;

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

int main() {
  string str;
  string candies[] = {"this", "the", "that"};
  while(getline(cin, str)) {
    find_cnt = 0;
    find_str = "";
  for (int m = 1; m < 26; ++m) {
    for (int i = 0; i < str.length(); ++i) {
      if (str[i] == ' ') {
        continue;
      }
      if (str[i] == ',' || str[i] == '.') {
        str[i] = ' ';
        continue;
      }
      if (m != 1) {
        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);
      }
    }
    for (int i = 0; i < sizeof(candies) / sizeof(candies[0]); ++i) {
      find(str, candies[i]);
    }
  }
  if (find_str != "") { 
    cout << find_str << endl;
  }
  }
  return 0;
}

C++: #include <stdio.h>

int main(){
		int i=0;
		int j=0;
		char str[100];
		char s;
		int solved = 0;

		do{
			scanf("%c",&s);
			str[i]=s;
			i++;
		}while(s!='\n');
		str[i]='\0';
//		printf("\ninput: %s\n",str);
		i=0;
		do{
			while(str[i] != '\0'){
					if(str[i]!=' ' && str[i]!='.'){
							str[i]=str[i]-1;
					}
					i++;
			}
//			printf(" try: %s\n",str);
			for(j=0;j<i-4;j++){
			if(j==0 || str[j-1]==' '){
					if(str[j]=='t' && str[j+1]=='h'){
//							printf("  -> ok ");
							if(str[j+2]=='e'){
//								printf("ok ");
								if(str[j+3]=='\0'||str[j+3]==' '){
//									printf("ok \n");
									solved = 1;
									break;
								}
							}else if(str[j+2]=='i' && str[j+3]=='s'){
//								printf("ok ");
								if(str[j+4]=='\0'||str[j+4]==' '){
//									printf("ok \n");
									solved = 1;
									break;
								}
							}else if(str[j+2]=='a' && str[j+3]=='t'){
//								printf("ok ");
								if(str[j+4]=='\0'||str[j+4]==' '){
//									printf("ok \n");
									solved = 1;
									break;
								}
							}
					}
			}
			}
			i=0;
		}while(str[0]>='a' && solved==0);
		if(solved==0){
//				printf("\n<< false >>\n\n");
		}else{
//				printf("\nsolved >> \"%s\"\n\n",str);
				printf("%s",str);
		}

		return 0;
};