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>
using namespace std;

char shift(char in){
	if('a'<=in&&in<='y'){
		return in+1;
	}else if(in=='z'){
		return 'a';
	}else{
		return in;
	}	
}
int main(){
	char a[100];
	string data;
	while(cin.getline(a,100)){
//	cout<<a<<endl;
		while(true){
			data=a;
			if(data.find("the")!=-1 || data.find("this")!=-1 || data.find("that")!=-1)
				break;
			for(int i=0;a[i]!='\0';i++){
				a[i]=shift(a[i]);
			}
//		cout<<a<<endl;
		}
		cout<<data<<endl;
	}
}

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

int main(){
	string s, strCopy;
	while (getline(cin, s)) {
		for(int j=0 ; j<26 ; j++){
			for(int i=0 ; i<s.size() ; i++){
				if(s[i]>='a' && s[i]<='z'){
					s[i] = (s[i]=='z')? 'a' : s[i] + 1;
				}
			}
			if( s.find( "the" ) != string::npos || s.find( "this" ) != string::npos || s.find( "that" ) != string::npos){
				cout << s << endl;
			}
		}
	}
	
	return 0;
}

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


int main()
{
	string s, line[81];
	int counter = 0;
	getline(std::cin, s);
	s += "\n";

	//入力内容を配列にとる．
	string word = "";
	for (int i = 0; i < (signed)s.length(); i++){
		if (s[i] == ' ' || s[i] == '\n'){
			line[counter++] = word;
			word = "";
		}
		else{
			word += s[i];
		}
	}

	

	//ずらす数を探す
	int slide;
	for (int i = 0; i <= 26; i++){
		for (int j = 0; j < counter; j++){
			string word = "";
			for (int k = 0; k < (signed)line[j].length(); k++){
				if (line[j][k] != '.' && line[j][k] != ' '&& line[j][k] != '\n'){
					word += 'a' + (line[j][k] + i - 'a') % 26;
				}
				else{
					word += line[j][k];
				}
			}
			if (word == "the" || word == "this" || word == "that"){
				slide = i;
				goto jump;
			}

		}
	}

jump:

	//ずらすべき数だけずらす
	for (int i = 0; i < counter; i++){
		for (int j = 0; j <(signed)line[i].length(); j++){
			if (line[i][j] != '.' && line[i][j] != ' '&& line[i][j] != '\n'){
				line[i][j] = 'a' + (line[i][j] + slide - 'a') % 26;
			}
		}
	}

	//出力
	for (int i = 0; i < counter - 1; i++){
		cout << line[i] << " ";
	}
	cout << line[counter - 1] << endl;


	return 0;
}

C++: #include<iostream>
#include<string>
int main(){
	std::string str;
	std::getline(std::cin,str);
	for(int i=0;i<str.size();i++){
		if(str[i]!=' ')str[i]+=1;
	}
	std::cout<<str<<std::endl;
	return 0;
}

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

using namespace std;

void solve()
{
	string str;
	while(getline(cin, str))
	{
		int n = str.size();
		for(int i = 0; i < 26; ++i)
		{
			string Ans = str;
			for(int j = 0; j < n; ++j)
			{
				if('a' <= Ans[j] && Ans[j] <= 'z')
				{
					if(Ans[j] + i > 'z')
					{
						Ans[j] += i;
						Ans[j] -= 26;
					}
					else
					{
						Ans[j] += i;
					}
				}
			}
			if(Ans.find("this") != string::npos || Ans.find("that") != string::npos || Ans.find("the") != string::npos)
			{
				cout << Ans << endl;
				break;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include<cstdio>

using namespace std;



char shiftch(char p, int n){
	int t;
	if('A'<= p && p <='Z'){
		p-='A';
		if(n<0) n+=26;
		p+=n;
		p%=26;
		p+='A';
		return p;
	}
	else if('a'<= p && p <='z'){
		p-='a';
		if(n<0) n+=26;
		p+=n;
		p%=26;
		p+='a';
		return p;
	}
	else return p;
}

int main(){

	int	i, j, n;
	char in[1000], *p, *tp;
	p= in;

//	scanf("%[^\n]", in);
	fgets(in, 1000, stdin);
	for(n=0; 16<=in[n] && in[n]<=126; n++);


	while(1){
		tp=p;
		for(i=0; *(p++)!=' ';	i++);
		if(i==3||i==4){

			j=*tp-'t'; if(*(tp+1)=='h'+j) break;
			j=*tp-'T'; if(*(tp+1)=='h'+j){
			j+='a'-'A';
			break;
			}
		}
	}
	for(i=0; i<n; i++)	in[i]=shiftch(in[i],-j);

	printf("%s\n",in);

	return 0;
}

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

using namespace std;

int main() {
  string str;
  getline(cin, str);
  for (int i = 0; i < 26; ++i) {
    for (char& c : str) {
      if (isalpha(c)) {
        if (c != 'z') ++c;
        else c = 'a';
      }
    }
    if (str.find("that") != string::npos || str.find("this") != string::npos || str.find("the") != string::npos) {
      cout << str << endl;
    }
  }
}

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

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){

    string s[] = {"this","the","that"};
    vector<string> in;
    while(true){
	string temp;
	cin >> temp;
	if(cin.eof()) break;
	in.PB(temp);

    }
    bool f = false;
    int d = 1;
    REP(i,30){

	f = true;
	REP(i,in.size()) REP(j,in[i].size()){
	    if(in[i][j] == '.') continue;
	    in[i][j] = (char)( 'a' + ( (int)(in[i][j] - 'a') + d) % 28);
	}
	vector<bool> flgs(3,false);
	for(int i=0;i<in.size();i++){
	    REP(j,3){
		bool flg = true;
		REP(k,s[j].size()) if(s[j][k] != in[i][k]) flg = false;
		if(flg)
		    flgs[j] = true;
	    }
	}
	if(flgs[0] && (flgs[1] || flgs[2])) break;
    }
    REP(i,in.size()-1) cout << in[i] << " ";
    cout << in[in.size()-1] <<  endl;

    return 0;
}

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

using namespace std;


int main(){
	string tmp;
	string key[] = {"the","this","that"};
	int alfabet = 26;
	bool clearFlag;
	while(getline(cin,tmp)){
		clearFlag = false;

		while(alfabet--){

			for(string::iterator it = tmp.begin(); it != tmp.end(); it++){
				if(*it >= 'a' && *it <= 'z'){
					(*it)++;
					if(*it >= 'z'){
						*it = 'a';
					}
				}
			}
			for(int j = 0; j < 3; j++){
				if(tmp.find(key[j]) != string::npos){
					cout << tmp << endl;
					clearFlag = true;
					break;
				}
			}

			if(clearFlag == true){
				break;
			}

		}

	}
	return 0;
}