Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define X real()
#define Y imag()
#define value(x,y,w,h) (x >= 0 && x < w && y >= 0 && y < h)
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

typedef long long ll ;
typedef deque<int> di ;
typedef deque<ll> dl ;
typedef map<string,int> dict;
typedef complex<double> comd;
typedef pair<int,int> pii;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

double CalcDist(comd p1, comd p2){
  return sqrt(pow(p1.X - p2.X,2.0) + pow(p1.Y -p2.Y,2.0));
}

  template <typename T>
void out(deque < T > d)
{
  for(size_t i = 0; i < d.size(); i++)
  {
    debug(d[i]);
  }
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

string Decode(string s, int n){
  string res = s;
  rep(i,s.size()){
    if(s[i] != '.' && s[i] != ' '){
      if(s[i] + n > 'z'){
        res[i] = 'a' + (s[i] + n - 'z')-1;
      }
      else{
        res[i] = s[i] + n;
      }
    }
  }
    debug(res) ;
  return res;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  int code;
  vector<string> vs;
  while(1){
    code = 0;
    getline(cin,s);
    if(cin.eof()) break;
    rep(i,27){
      if(Decode(s,i).find("this") != string::npos ||Decode(s,i).find("that") != string::npos||Decode(s,i).find("the") != string::npos){
        code = i;
        break;
      }
    }
    cout << Decode(s,code) << endl;
  }
  return 0;
}

C++: /*0017 written by iPhone*/
#include <iostream>
#include <string>
#include <cstring>

using namespace std;

int main(){
    string s;
    while(getline(cin, s) && s != "\0"){
        for(int i = 0; i < s.size(); i++) s[i]++;
        if(strstr(s.c_str(), "the") != NULL || strstr(s.c_str(), "this") = NULL || strstr(s.c_str(), "that") != NULL ){
            cout << s;
            return 0;
        }
    }
    return 0;
}

C++: #include <cstdio>
#include <string.h>

using namespace std;

int main()
{
	char in[81];
	char tht[3][10] = {"the","this","that"};
	int len;
	bool end;

	while(gets(in)){
		len = strlen(in);
		end = false;
		for(int i = 1; i < 26; i++){
			for(int j = 0; j < len; j++){
				if(in[j] >= 'a' && in[j] <= 'z'){
					if(in[j] == 'z'){
						in[j] = 'a';
					}
					else{
						in[j]++;
					}
				}
			}
			for(int c = 0; c < 3; c++){
				if(strstr(in,tht[c]) != NULL){
					printf("%s\n",in);
					end = true;
				}
			}
			
			if(end){
				break;
			}
		}
	}

	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++){
			for(int j=0; j < s.size(); j++){
				if('a' <= s[j] && s[j] < 'z') s[j] = s[j] + 1;
				else if(s[j] == 'z') s[j] = 'a';
			}
			if(s.find("the") != string::npos || s.find("this") != string::npos || s.find("that") != string::npos){
				cout << s << endl;
			}
		}
	}
}

C++: #include <stdio.h>
#include <string.h>

char buf[99];

int main(){
    int i;

    for(;~scanf("%[^\n] ",buf);){
        for(i=0;;i++){
            if( buf[i]-buf[i+1]==12 || buf[i]-buf[i+1]==-14 ){
                break;
            }
        }
        int sa = buf[i] - 't';
        for(i=0; buf[i]!='\0'; i++){
            if( 'a' <= buf[i] && buf[i]<='z' ){
                int tmp = buf[i] - sa;
                putchar( tmp + (tmp<'a' ? 26 : tmp>'z' ? -26 : 0) );
            }
            else{
                putchar(buf[i]);
            }
        }
        puts("");
    }
    return 0;
}

C++: 
#include <stdio.h>
#include <math.h>
#include <string.h>

#define JUDGE(x) (strstr(change,x))

int main(){
    
    int i,j;
    char str[100],change[100];
    while (gets(str) != NULL) {
        for (i=0; i<26; i++) {
            for (j=0; j<strlen(str); j++) {
                if(str[j]>='a' && str[j]<='z')
                    change[j] = str[j]+i >'z'? str[j]+i-26: str[j]+i;
                else
                    change[j] = str[j];
            }
            if (JUDGE("this") || JUDGE("that") || JUDGE("the")) {
                puts(change);
                break;
            }
        }
        memset(str, '\0', sizeof(str));
        memset(change,'\0', sizeof(change));
    }
    
    
    return 0;
    
}

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

typedef pair<string, string> P;

P next_word(string sentence) {
  if (sentence.empty()) return make_pair(string(""), string(""));
  if (sentence[0] == ' ' || sentence[0] == '.') {
    return make_pair("", sentence.substr(1));
  } else {
    P recur = next_word(sentence.substr(1));
    return make_pair(sentence[0] + recur.first, recur.second);
  }
}

bool acceptable(string sentence) {
  P p = next_word(sentence);

  while (! p.first.empty() ) {
    if (p.first == "this" || p.first == "the" || p.first == "that")
      return true;

    p = next_word(p.second);
  }
  return false;
}

char slip(char c) {
  if (c < 'a' || 'z' < c) return c;
  
  string alphabet = "abcdefghijklmnopqrstuvwxyza";
  int index = (int)(c - 'a');
  return alphabet[index + 1];
}

char slip(char c, int n) {
  for (int i = 0; i < n; i++)
    c = slip(c);

  return c;
}

string slip(string code, int n) {
  string val;
  for (int i = 0, len = code.length(); i < len; i++)
    val += slip(code[i], n);

  return val;
}

string decode(string code) {
  for (int i = 1; i < 27; i++) {
    string sentence = slip(code, i);
    if (acceptable(sentence))
      return sentence;
  }

  return "";
}

int main() {
  string code;
  while ( getline(cin, code) )
    cout << decode(code) << endl;
}

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

#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)

int main() {
	while(1) {
		char str[10000] = {0};
		if(gets(str) == NULL) break;
		rep(i,26) {
			if(strstr(str, "the") || strstr(str, "this") || strstr(str, "that")) break;
			for(int j = 0; j < strlen(str); j++) {	
				if(isalpha(str[j])) {
					str[j] != 'z' ? str[j]++ : str[j] = 'a';
				}
			}
		}
		printf("%s\n", str);
	}
	return 0;
}

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

using namespace std;

int main(){
  string text;
  while(getline(cin,text,'\n')){
    for(int i=0;i<26;i++){
      for(int w=0;w<text.size();w++){
	if ('a'<=text[w]&&text[w]<'z')
	  text[w]++;
	else if(text[w]=='z')
	  text[w] = 'a';
      }
      if (text.find("this") != string::npos||text.find("that") != string::npos||text.find("the") != string::npos){
	cout << text << endl;
	break;
      }
    }
  }
}