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
//------------------------------------------
#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 <queue>
#include <iterator>
#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;

//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 gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

int main(){
   vector<string> a;
   string b;
   while(cin>>b){
      REP(i,b.size()) if(b[i]!='.')b[i]-=4;
      a.PB(b);
   }
   REP(i,a.size()){
      cout << a[i];
      if(i!=a.size()) cout << " ";
   }
   cout << endl;
   return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int getShiftVal(string& line){
	int s = line.size();
	string::size_type ps = 0, pe = 0;
	while (true){
		while (ps < s && line[ps] == ' ') ++ps;
		pe = ps;
		while (pe < s && line[pe] != ' ') ++pe;
		if (ps == s || pe == s)
			break;
		int len = pe - ps;
		if (3 == len){
			if (line[ps] == line[ps + 1] + 12 && line[ps] == line[ps + 2] + 15){
				return int('t' - char(line[ps]));
			}
		}
		else if (4 == len){
			if (line[ps] == line[ps + 1] + 12 && line[ps] == line[ps + 2] + 11 && line[ps] == line[ps + 3] + 1){
				return int('t' - char(line[ps]));
			}
			else if (line[ps] == line[ps + 1] + 12 && line[ps] == line[ps + 2] + 19 && line[ps] == line[ps + 3]){
				return int('t' - char(line[ps]));
			}
		}
		ps = pe;
	}
	return -1;
}

int main()
{
	string line;
	while (std::getline(cin, line)){
		int s = line.size();
		int v = getShiftVal(line);
		for (int i = 0; i < s; ++i){
			char c = line[i];
			if (c == ' ' || c == '.' || c == '\n') cout << c;
			else cout << char(c + v);
		}
		cout << "\n";
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main(){
  string s,t;
  while(getline(cin,s)){

    for(int i = 1 ; i <= 25 ; i++ ){
      t = "";
      for(int j = 0 ; j < (int)s.size() ; j++ ){
	if('a'<= s[j] && s[j]<= 'z'){
	  if((s[j] + i) > 'z')t+=(s[j] + i - 25);
	  else t+=(char)(s[j]+i);
	}
	else t += s[j];
      }
      if(t.find("the") != string::npos ||
	 t.find("this") != string::npos ||
	 t.find("that") != string::npos ){
	cout << t << endl;
	break;
      }
    }
  }
  return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string.h>
#include <queue>
#include <stack>
#include <utility>
#include <queue>
#define mp make_pair
#define pii pair<int,int> 
#define ff first
#define ss second

using namespace std;

char a[1000];
int b,c;

int main()
{
	while(fgets(a,999,stdin) != NULL)
	{
		c=0;
		while(true)
		{
			if(strstr(a,"this")!=NULL||strstr(a,"the")!=NULL||strstr(a,"that")!=NULL)break;
			for(b=0;a[b]!='\0';b++)
			{
				if(islower(a[b]))
				a[b]++;
				if(a[b]>122)
				a[b]=97;
			}
			c++;
			if(c>27)
			break;
		}
		printf("%s",a);
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	const string key[] = { "the", "this", "that" };
//	cut here before submit 
//	freopen("testcase.cc", "r", stdin);
	string str = "";
	
	while (getline (cin, str )){
		int len = str.length();
		int i,j;
		vector <bool> match (3, false);
		for (j = 0; j < 26; ++j){
			string curr = str;
			for (i = 0; i < len; ++i){
				if ( isalpha(curr[i]) ){
					curr[i] = (curr[i] - 'a' + 26 - j) % 26 + 'a';
				} // end if
			} // end for
			
			for (i = 0; i < 3; ++i){
				if ( curr.find(key[i]) != string::npos ){
					match[i] = true;
				} // end if
			} // end for
			if ((int)count(match.begin(), match.end(), true ) == 3){
				cout << curr << endl;
				break;
			} // end if
		} // end for
	} // end while
		
	return 0;
}

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

using namespace std;

int main()
{
	string S[80]; int C = 0;

	while (getline(cin, S[C]))
	{
		C++;
	}

	for (int i = 0; i < 26; i++)
	{
		for (int c = 0; c < C; c++)
		{
			if (!(S[c].find("this") == string::npos && S[c].find("that") == string::npos && S[c].find("the") == string::npos))
			{
				for (int j = 0; j < C; j++) { cout << S[j] << endl; }

				goto Exit;
			}

			for (string::size_type j = 0; j < S[c].size(); j++)
			{
				if (isalpha(static_cast<int>(S[c][j])))
				{
					if (S[c][j] == 'z')
					{
						S[c][j] = 'a';
					}
					else
					{
						S[c][j]++;
					}
				}
			}
		}
	}

Exit:;

	return 0;
}