Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if len(infos) == 0 {
			break
		}
		// 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 <cstdio>
#include <cstring>
using namespace std;



int main(int argc, const char * argv[])
{
    string word;
    while (getline(cin, word)) {
        int cnt = 0;
        for (char tmp2 = word[0]; tmp2 < 'z'; tmp2++) {
            if (tmp2 == 't') {
                break;
            }
            cnt++;
        }
        cnt = 0;
        for (char tmp2 = word[0]; tmp2 > 'a'; tmp2--) {
            if (tmp2 == 't') {
                break;
            }
            cnt--;
        }
        for (int i = 0; i < word.size(); i++) {
            if (word[i] == '.') {
                
            }
            else if (word[i] != ' ') {
                word[i] += cnt;
            }
        }
        cout << word << endl;
    }

    
    return 0;
}

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

using namespace std;

int main(){
	string str;
	getline(cin,str);
	for(int num=0;num<26;num++){
		for(int i=0;i<str.length();i++){
			if(97<=str[i] && str[i]<=122){
				str[i]+=1;
				if(str[i]>122) str[i] -=26;
			}
		}
		string::size_type index1 = str.find("the");
		string::size_type index2 = str.find("this");
		string::size_type index3 = str.find("that");
		
		if( index1 == string::npos && index2 == string::npos &&
		    index3 == string::npos){
			continue;
		}else{
			cout << str <<endl;
			break;
		}
	}
	return 0;

}

C++: #include<iostream>
#include<vector>
using namespace std;
bool isAlpha(char ch){
  return (('A'<=ch&&ch<='Z')||('a'<=ch&&ch<='z'));
}
string change(string str){
  for(int i=0;i<(int)str.size();i++){
    if(isAlpha(str[i])){
      if(str[i]=='z'||str[i]=='Z')str[i]-=25;
      else str[i]++;
    }
  }
  return str;
}
int main(){
  int ans=-1;
  string str;
  vector <string> tab;
  while(cin>>str){
    tab.push_back(str);
    for(int i=0;i<26&&ans==-1;i++){
      str=change(str);
      if(str=="the"||str=="this"||str=="that"){
	ans=i;
      }
    }
  }
  //cout<<ans<<endl;
  for(int i=0;i<(int)tab.size();i++){
    if(i)cout<<' ';
    str=tab[i];
    for(int j=0;j<=ans;j++)str=change(str);
    cout<<str;
  }
  cout<<endl;
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  string str[80];
  vector<int> num;
  //while(cin>>str[i]){
  for(int i=0;i<10;i++){
    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 <iostream>
#include <string>
using namespace std;
void slide(string& s) {
  for (auto& c: s)
    if (c == 'a') c = 'z';
    else if (c != '.' && c != ' ') c -= 1;
}
bool check(const string& s) {
  if (s.find("the") == string::npos) return true;
  if (s.find("this") == string::npos) return true;
  if (s.find("that") == string::npos) return true;
  return false;
}
int main() {
  string line;
  while(getline(cin, line)) {
    while(check(line))
      slide(line);
    cout << line << endl;
  }
}

C++: //include
 //------------------------------------------
 #include <vector>
 #include <list>
 #include <map>
 #include <set>
 #include <deque>
 #include <stack>
 #include <bitset>
 #include <algorithm>
 #include <functional>
 #include <numeric>
 #include <utility>
 #include <sstream>
 #include <iostream>
 #include <iomanip>
 #include <cstdio>
 #include <cmath>
 #include <cstdlib>
 #include <cctype>
 #include <string>
 #include <cstring>
 #include <ctime>

 using namespace std;

 //conversion
 //------------------------------------------
 inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
 template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

 //math
 //-------------------------------------------
 template<class T> inline T sqr(T x) {return x*x;}

 //typedef
 //------------------------------------------
 typedef vector<int> VI;
 typedef vector<VI> VVI;
 typedef vector<string> VS;
 typedef pair<int, int> PII;
 typedef long long LL;
 typedef unsigned long long ULL;

 //container util
 //------------------------------------------
 #define ALL(a)  (a).begin(),(a).end()
 #define RALL(a) (a).rbegin(), (a).rend()
 #define PB push_back
 #define MP make_pair
 #define SZ(a) int((a).size())
 #define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
 #define EXIST(s,e) ((s).find(e)!=(s).end())
 #define SORT(c) sort((c).begin(),(c).end())

 //repetition
 //------------------------------------------
 #define FOR(i,a,b) for(int i=(a);i<(b);++i)
 #define REP(i,n)  FOR(i,0,n)

 //constant
 //--------------------------------------------
 const double EPS = 1e-10;
 const double PI  = acos(-1.0);

 //clear memory
 #define CLR(a) memset((a), 0 ,sizeof(a))

 //debug
 #define dump(x)  cerr << #x << " = " << (x) << endl;
 #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

 int main() {
   int n;
   string str;

   while(getline(cin, str)) {
     for(int i = 0; i < str.size(); i++) {
       for(int j = 0; str[i]+j <= 'z'; j++) {
	 if(str[i] + j == 't' && str[i+1] + j == 'h') {
	   n = j;
	   break;
	 }
       } 
       for(int j = 0; str[i]-j >= 'a'; j++) {
	 if(str[i] - j == 't' && str[i+1] - j == 'h') {
	   n = -j;
	 break;
	 }
       }
     }
     
     for(int i = 0; i < str.size(); i++) {
       if(str[i] == ' ' || str[i] == '.' || str[i] == '\n') printf("%c", str[i]);
       else printf("%c", str[i]+n);
     }
     cout << endl;
   }
 }