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 <complex>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

string rotate(string str) {
    for (int i = 0; i < str.size(); i++) {
        if ('a' <= str[i] && str[i] < 'z')str[i]++;
        if (str[i] == 'z')str[i] = 'a';
    }
    return str;
}

int main() {
    string str;
    while(getline(cin, str)) {
        for (int i = 0; i < 26; i++) {
            str = rotate(str);
            bool flg = false;
            stringstream ss(str);
            string tmp;
            while(ss >> tmp) {
                if (tmp == "the" || tmp == "this" || tmp == "that")flg = true;
                break;
            }
            if (flg)cout << str << endl;
        }
    }
    return 0;
}

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

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<vector>
using namespace std;
int word_search(vector<string> s,  string key){
	for(int i = 0; i < s.size(); i++){
		if(s[i].length() <= 2 || s[i].length() >= 6) continue;
		for(int j = 0; j < s[i].length() - 1; j++)
			if(s[i][j] == '.') continue;
		if(s[i][s[i].length() - 1] == '.') s[i].erase(s[i].end() - 1);
		for(int j = 0; j < 26; j++){
			string turned_word;
			for(int k = 0; k < s[i].length(); k++){
				turned_word.push_back((s[i][k] + j - 'a') % 26 + 'a');
			}
			if(turned_word == key) return j;
		}
	}
	return -1;
}
int main(){
	for(;;){
		char line[200];
		if(fgets(line, sizeof(line), stdin) == NULL) break;
		vector<string> s;
		char *token = strtok(line, " ");
		s.push_back(token);
		for(;;){
			token = strtok(NULL, " ");
			if(token == NULL) break;
			s.push_back(token);
		}
		int num;
		if(word_search(s, "the") != -1) num = word_search(s, "the");
		if(word_search(s, "this") != -1) num = word_search(s, "this");
		if(word_search(s, "that") != -1) num = word_search(s, "that");
		for(int i = 0; i < s.size(); i++){
			for(int j = 0; j < s[i].length(); j++){
				if(s[i][j] == '.' || s[i][j] == '\n') cout << s[i][j];
				else cout << (char)((s[i][j] + num - 'a') % 26 + 'a');
			}
			if(i != s.size() - 1)cout << ' ';
		}
	}
	return 0;
}

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

	while(getline(cin,s))
	{
		for ( int i=0; i<26; i++ )
		{
			string t;
			for ( int j=0; j<(int)s.length(); j++ )
				if ( 'a'<=s[j]&&s[j]<='z' )
					t += (s[j]-'a'+i)%26+'a';
				else
					t += s[j];
			if ( t.find("the")!=t.npos ||
				 t.find("this")!=t.npos ||
				 t.find("that")!=t.npos )
			{
				cout << t << endl;
				break;
			}

		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
	string t;
	string box[3]={"that","this","the"};
	int i;
	int flg;
	int x,n;
	while(1){
		getline(cin,t);
		if(cin.eof()==1)	break;
		flg=0;
		n=26;
		while(n--){
			for(i=0;i<(int)t.size();i++){
				if('a'<=t[i]&&t[i]<='z')	t[i]+=1;
				if(t[i]=='{')				t[i]='a';
			}
			//cout<<t<<endl;
			for(i=0;i<3;i++){
				x=(int)t.find(box[i]);
				if(x!=-1){
					flg=1;
					break;
				}
			}
			if(flg==1)	break;
		}
		cout<<t<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
string word[3] = {"this","that","the"};
int main(){
  char c;
  string s[8000];
  int smax = 0;
  while(scanf("%c",&c) != EOF){
    if(c == '\n' || c == ' '){
      smax++;s[smax] += c;
      smax++;
    }else{
      s[smax] += c;
    }
  }smax++;
  bool flag = false;
  while(1){
    for(int i = 0;i < smax;i++){
      for(int j = 0;j < s[i].size();j++){
	if('a' <= (s[i][j]) && (s[i][j]) <= 'z'){
	  s[i][j]++;
	  if(s[i][j] == 'z' + 1)s[i][j] = 'a';
	}
	if(flag)continue;
	for(int j = 0;j < 3;j++){
	  if(word[j] == s[i]){flag = true;break;}
	}for(int j = 0;j < 3;j++){
	  if(word[j] + '.' == s[i]){flag = true;break;}
	}
      }
    }
    if(flag)break;
  }
  for(int i = 0;i < smax;i++)cout << s[i];
  return 0;
}

C++: #include <cstdio>
#include <cstring>

int main(void)
{

	char str[100];
	gets(str);

	while(!strstr(str, "this") && !strstr(str, "the") && !strstr(str, "that"))
		for(int i = 0; i < strlen(str); i++){
			if(str[i] >= 'a' && str[i] <= 'a'+26)
				str[i] = 'a' + (str[i] - 'a' + 1) % 26;
		}

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


}

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

int main(){
	string str;
	getline(cin, str);

	for(int i = 0; i < str.size(); i++){
		if(str[i] >= 'a' && str[i] <= 'z'){
			str[i] -= 'x' - 't';
		}
	}

	cout << str << endl;

}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  string str[80];
  vector<int> num;
  while(cin>>str[i]){
    if(str[i].size()==4||str[i].size()==3)
      num.push_back((str[i].size()*100)+i);
  }
  int flag=0,zure=0;
  for(int i=0;i<num.size();i++){
    if(num[i]/100==3){
      for(int j=0;j<3;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-300][0]=='t'+k){
	    if(str[num[i]-300][1]=='h'+k&&str[num[i]-300][2]=='e'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
    else{
      for(int j=0;j<4;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-400][0]=='t'+k&&str[num[i]-400][1]=='h'+k){
	    if(str[num[i]-400][2]=='i'+k&&str[num[i]-400][3]=='s'+k||str[num[i]-400][2]=='a'+k&&str[num[i]-400][2]=='t'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
  }
  for(int j=0;j<10;j++){
    for(int k=0;k<str[j].size();k++){
      str[j][k]=str[j][k]+zure;
    }
  }
  for(int j=0;j<10;j++){
    cout<<str[j];
    if(j!=10)
      cout<<" ";
  }cout<<endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

double pi = acos(-1);
typedef complex<double> P;
int main(){
	string kw[] = {"the","this","that"};
	string s;
	while(getline(cin,s)){
		for(int k = 0 ; k < 26 ; k++){
			string t = s;
			for(int i = 0 ; i < s.size() ; i++){
				if( s[i] == 32 ) continue;
				if( s[i] == '.' ) continue;
				t[i] = (s[i] - 'a' + k) % 26 + 'a';
			}
			if( t.find(kw[0]) != -1 or t.find(kw[1]) != -1 or t.find(kw[2]) != -1 ){
				cout << t << endl;
				break;
			}
		}
	}
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
using namespace std;
int main(){
  string str;
  char s[256];
  getline(cin , str);
  int n = str.size();
  int w = 1;
  for(int i=0;i<=n;i++){
    s[i] = str[i];
  }
  while(1){
    
    for(int i=0;i<n;i++){
      if(s[i] != ' ' && s[i] != '.'){
	s[i]++;
	if(s[i]>'z')s[i] = s[i] - 'z' + 'a' - 1;
      }
    }
    if(strstr(s,"the") != NULL)break;
    if(strstr(s,"that") != NULL)break;
    if(strstr(s,"this") != NULL)break;
  }
  printf("%s\n",s);
}