Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

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

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

int main(){
    string before;
    while (getline(cin, before)) {
        int swich = 0;
        for (int i = 0; i < 27 ;i++) {
            for (int j = 0; j < before.size(); j++) {
                if (isalpha(before[j])) {
                    before[j]++;
                }
                if (before[j]>'z') {
                    before[j] = 'a';
                }

            }
            for (int j = 0; j < before.size(); j++) {
                if (before[j]=='t'&& before[j+1]=='h'&& before[j+2]=='e') {
                    if (before[j+3]==' '|| before[j+3]=='.'|| before[j+3] == '\n') {
                        swich = 1;
                        break;
                    }
                }
                else if (before[j]=='t'&&before[j+1]=='h'&&before[j+2]=='a'&&before[j+3]=='t') {
                    if (before[j+4]==' '||before[j+4]=='.'|| before[j+4] == '\n') {
                        swich = 1;
                        break;
                    }
                }
                else if (before[j]=='t'&&before[j+1]=='h'&&before[j+2]=='i'&&before[j+3]=='s') {
                    if (before[j+4]==' '||before[j+4]=='.'|| before[j+4] == '\n') {
                        swich = 1;
                        break;
                    }
                }
            }
            if (swich == 1) {
                break;
            }
        }
        cout << before << endl;
    }
    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::size_type x,y,z;
      x = s.find("this");
      y = s.find("that");
      z = s.find("the");
      if(x!=string::npos) break;
      if(y!=string::npos) break;
      if(z!=string::npos) break;
      for(int j=0; j<s.size(); j++){
	if(s[j]>='a' && s[j]<'z') s[j]++;
	else if(s[j] == 'z') s[j] = 'a';
      }
    }
    cout <<s<<endl;
  }
  return 0;
}