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++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  string s;
  while(getline(cin, s)){
    FOR(i, 1, 26){
      string t = s;
      string res = "";
      rep(j, t.size()){
        if(!('a' <= s[j] && s[j] <= 'z')){
          res += t[j];
        }else{
          res += char(((int(t[j] - 'a') + i) % 26) + 'a');
        }
      }
      string tmp = "";
      bool flag = false;
      rep(j, res.size()){
        if(res[j] != ' ' && res[j] != '.')tmp += res[j];
        else{
          if(tmp == "the" || tmp == "this" || tmp == "that"){
            flag = true;
            break;
          }
          tmp = "";
        }
      }
      if(flag){
        cout << res << endl;
        break;
      }
    }
  }
	return 0;
}

C++: #define scanf_s scanf
#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
#define ABC 26
int main(void)
{
	int n, s = 0, x, y, r = 0, d;
	char str[MAX];
	while (gets_s(str) != NULL) {
		for (int i = 0; str[i] != '\0'; ++i) {
			if (str[i] - 't' == str[i + 1] - 'h') {
				d = str[i] - 't';
				if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
				else if ((str[i + 2] - 'a' - d + ABC) % ABC == 'i' - 'a' && (str[i + 3] - 'a' - d + ABC) % ABC == 's' - 'a') { break; }
				else if ((str[i + 2] - 'a' - d + ABC) % ABC == 'a' - 'a' && (str[i + 3] - 'a' - d + ABC) % ABC == 't' - 'a') { break; }
			}
		}
		for (int i = 0; str[i] != '\0'; ++i) {
			if ('a' <= str[i] && str[i] <= 'z') {
				printf("%c", (str[i] - 'a' - d + ABC) % ABC + 'a');
			}
			else { printf("%c", str[i]); }
		}
//		printf("\n");
	}
}

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

using namespace std;

void caesar(char* a)
{
	for (int i=0; i<strlen(a); i++) {
		if (a[i] == ' ' || a[i] == '.') continue;
		else if (a[i] == 'z') a[i] = 'a';
		else a[i]++;
	}
}

int main()
{
	char buf[81];
	
	for (int k=0; k<20; k++) {
		if (fgets(buf, 80, stdin) == NULL) break;
		int len = strlen(buf);
		for (int i=0; i<26; i++) {
			if ( (strstr(buf, "the") != NULL) || (strstr(buf, "this") != NULL) || (strstr(buf, "that") != NULL) ) {
				cout << buf << endl;
				break;
			}
			caesar(buf);
		}
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;

int cmp(string s){
	if(s.find("is",0)!=string::npos) return 1;
	if(s.find("the",0)!=string::npos) return 1;
	if(s.find("this",0)!=string::npos) return 1;
	return 0;
}

int main() {
	string s;
	getline(cin,s);
	for(int h=0;h<26;h++){
		for(unsigned int i=0;i<s.length();i++){
				if(s[i]==0x2e||s[i]==0x20||s[i]==0x0c) continue;
				s[i]+=1;
				if((int)s[i]>0x7a) s[i]=0x61;
		}if(cmp(s)==1) break;
	} cout<<s<<endl;
	return 0;
}

C++: 

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j,k;
  string s;
  while(getline(cin,s)){
    int n=0;
    rep(i,s.size())if(s[i]==' ')n++;
    n++;
    vector<string> word(n);
    i=0;
    rep(j,n){
      while(s[i]>='a' && s[i]<='z')
	word[j].push_back(s[i]),i++;
      i++;
    }
    rep(k,26){
      bool c=false;
      rep(i,n)rep(j,word[i].size())
	if(word[i][j]=='z')word[i][j]='a';
	else word[i][j]=word[i][j]+1;
      rep(i,n)
	if(word[i]=="the" || word[i]=="this" || word[i]=="that"){
	  c=true;break;
	}
      if(c){
	rep(i,n){
	  if(i)cout<<" ";
	  cout<<word[i];
	}
	cout<<"."<<endl;
	break;
      }
    }
  }
}