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