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>

char sub(char a, char b) {
	if (a < b) return (26 + a - b);
	return (a - b);
}

char add(char a, char offset) {
	return ((((a - 'a') + offset) % 26) + 'a');
}

int main() {
	char offset;
	int num;
	std::string str;
	while (getline(std::cin, str)) {
		offset = 0;
		num = 0;
		for (int i=0; i<str.length(); i++) {
			if ('a' <= str[i] && str[i] <= 'z') {
				num++;
				if (i < str.length() - 1) {
					continue;
				}
				i++;
			}
			if ((num == 3
			&& sub(str[i-3], str[i-2]) == 12
			&& sub(str[i-3], str[i-1]) == 15)
			|| (num == 4
			&& sub(str[i-4], str[i-3]) == 12
			&& sub(str[i-4], str[i-2]) == 11
			&& sub(str[i-4], str[i-1]) == 1)
			|| (num == 4
			&& sub(str[i-4], str[i-3]) == 12
			&& sub(str[i-4], str[i-2]) == 19
			&& sub(str[i-4], str[i-1]) == 0))
			{
				offset = sub(str[i-num], 't');
				break;
			}
			num = 0;
		}
		for (int i=0; i<str.length(); i++) {
			if ('a' <= str[i] && str[i] <= 'z') {
				str[i] = add(str[i], 26 - offset);
			}
		}
		std::cout << str << std::endl;
	}
	return 0;
}

C++: 
#include <stdio.h>
#include<string.h>
int main()
{
    char a[200];
    int i,b,x,l,c,in;
    while(gets(a)!=EOF)
    {
        l=strlen(a);
         b=(int)a[0];
         x=116-b;
        for(i=0;i<l;i++)
        {
            if(a[i]>=97&&a[i]<=122)
            {
                in=(int)a[i];
                a[i]=in+x;
                }
            printf("%c",a[i]);
        }
        printf("\n");}
        return 0;

}

C++: #include<iostream>
#include<string>
using namespace std;
main(){
	string str;
	int tmp,b;
	while(getline(cin,str)){
		tmp='t'-str[0];
		for(int i=0;i<str.size();++i){
			if(str[i]>='a' && str[i]<='z'){
				if(str[i]>='m')str[i]-=26;
				str[i]+=tmp;
				if(str[i]<'a')str[i]+=26;
				else if(str[i]>'z')str[i]-=26;
			}
		}
		string str2="    ";
		for(int i=0;i<=3,i<=3;++i)str2[i]=str[i];
		if(str2=="this" || str2=="the " || str2=="that")cout<<str<<endl;
	}
}

C++: /*
NOTE :
*min_element(.begin(),.end())
*max_element(.begin(),.end())
stack push pop top
queue push pop front
priority_queue<> pq
 push()  pop() size()  top()
map<>
 find() begin() end() insert(map<>::value_type())
pair<>
sort(.begin(), .end())
sort(arr, arr+N)
sort(a, a+N, greater<int>())
binary_search(vc.begin(), vc.end(), x)  //binary_search???true, false?????????
vector<int>::iterator lit = lower_bound(vc.begin(), vc.end(), x);
  lower_bound?????????????????????"??\???"????????????????????????????????????????????¬???????????????
vector<int>::iterator uit = upper_bound(vc.begin(), vc.end(), x);
  upper_bound????????????????????????"?¶???????"?????????????????????????????????????????¬???????????????
*/
#include <iostream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cassert>
#include <algorithm>
#include <valarray>
#include <utility>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>

#define MAX 100
#define INF 1<<20
#define LLINF 10e12 // 1<<31 // 2^31
#define REP(i,n) for(int i=0;i<n;i++)
#define REP2(i,a,n) for(int i=(a);i<(n);i++)
#define SET(a,c) memset(a,c,sizeof a)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique(ALL((o))), (o).end());

using namespace std;
typedef long long ll;
typedef valarray<int> array_t;
/////
string key[3] =
{
  "the",
  "this",
  "that"
};
/////
int caeser(string S)
{
  int n = S.length();
  REP(i,26)
  {
    string tmp;
    REP(j,n)
    {
      if(S[j] == '.') continue;
      tmp += ((S[j]-'a'+i)%26)+'a';
    }
    REP(k,3) if(tmp == key[k]) return i;
  }
  return -1;
}

void decode(string &S,int t)
{
  if(t < 0) return;
  int n = S.length();
  REP(i,n)
  {
    if(S[i] == '.') continue;
    S[i] = ((S[i]-'a'+t)%26)+'a';
  }
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  // FROM HERE
  int t, n;
  string S;
  vector<string> data;
  while(cin >> S) data.push_back(S);
  n = data.size();
  REP(i,n) if((t=caeser(data[i]))!=-1) break;
  REP(i,n) decode(data[i],t);
  REP(i,n)
  {
    printf("%s",data[i].c_str());
    printf("%s",(i!=n-1)?" ":"\n");
  }
  return 0;
}

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

using namespace std;

int main()
{
	string str;
	
	while (getline(std::cin, str), !str.empty()){
		int j = 0;
		int di = 0;
		for (int i = 0; i < str.size(); i++){
			if (str[i] == ' '){
				if (i - j < 5 && i - j > 1){
					if (str[j] - str[j + 1] == 12){
						if (str[j + 1] - str[j + 2] == 3){
							di = str[j] - 't';
							break;
						}
						else if (str[j + 1] - str[j + 2] == -1){
							if (str[j + 2] - str[j + 3] == -10){
								di = str[j] - 't';
								break;
							}
						}
						else if (str[j + 1] - str[j + 2] == 7){
							if (str[j + 2] - str[j + 3] == -19){
								di = str[j] - 't';
								break;
							}
						}
					}
					
				j = i + 1;
				}
			}
		}
		
		for (int i = 0; i < str.size();i++){
			if ('a' <= str[i] && str[i] <= 'z' || 'A' <= str[i] && str[i] <= 'Z'){		
				str[i] = str[i] - di;
			}
		}
		
		cout << str << endl;
	}
}