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 <iostream>
#include <string>
#include <cstring>
using namespace std;

int main() {
  char buf[82];
  char *p;
  int l;
  string str;

  while (cin.getline(buf, 82)) {
    l = strlen(buf);

    for (int i=0; i<26; i++) {
      for (int j=0; j<l; j++) {
        if (buf[j]>='a' && buf[j]<='z') {
          buf[j] = (buf[j]-'a'+1)%26 + 'a';
        }
      }
      str.assign(buf);
      if (str.find("the")!=string::npos ||
          str.find("this")!=string::npos ||
          str.find("that")!=string::npos) {
        break;
      }
    }

    cout << str << endl;
  }
  return 0;
}

C++: #include <stdio.h>
#include <string.h>

int main(void)
{
	int i;
	int len;
	int f;
	int n;
	char str[128];
	
	while (fgets(str, 100, stdin) != NULL){
		f = 0;
		n = 0;
		while (1){
			len = strlen(str);
			for (i = 0; i < len; i++){
				if (strncmp(&str[i], "the", 3) == 0){
					f = 1;
				}
				if (strncmp(&str[i], "this", 4) == 0){
					f = 1;
				}
				if (strncmp(&str[i], "that", 4) == 0){
					f = 1;
				}
			}
			if (f == 1){
				break;
			}
			for (i = 0; i < len; i++){
				if (str[i] >= 'a' && str[i] < 'z'){
					str[i]++;
				}
				else if (str[i] == 'z'){
					str[i] = 'a';
				}
			}
			n++;
		}
		printf("%s", str);
	}
	return (0);
}

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;
}