Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

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) continue;
				s[i]+=1;
				if((int)s[i]>0x7a) s[i]=0x61;
		}if(cmp(s)==1) break;
	} cout<<s<<endl;
	return 0;
}

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;
      }
    }
  }
  return res;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  vector<string> vs;
  while(cin >> s){
    vs.clear();
    vs.pb(s) ;
    if(s[s.size()-1] != '.'){
      while(1){
        cin >> s;
        vs.pb(s) ;
        if(s[s.size()-1] == '.'){
          break;
        }
      }
    }
    int code = 0;
    rep(i,27){
      rep(j,vs.size()){
        if(Decode(vs[j],i) == "this" ||Decode(vs[j],i) == "that" || Decode(vs[j],i) == "the"){
          code = i;
          i = 27;
          j = vs.size();
        }
      }
    }
    rep(i,vs.size()){
      cout << Decode(vs[i],code) ;
      if(i != vs.size()-1){
        cout << " " ;
      }
    }
    cout << endl;
  }
  return 0;
}

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

using namespace std;

int main(){
	
	char A[100] = {};
	
	cin.getline(A, 80);
	
	for(int i=0;i<80;i++) {
	if( A[i] >= 'A' && A[i] < 'Z')
	A[i] += 1;
	
	else if( A[i] >= 'a' && A[i] < 'z')
	A[i] += 1;
	
	else if( A[i] == 'Z' || A[i] == 'z')
	A[i] -= 25;
	
}
	cout << A;
    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repr(i,a,n) for(int i=a;i>=n;i--)
#define INF 999999999
#define INF_M 2147483647
#define pb(a) push_back(a)

using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
typedef vector<pii> VP;

int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main() {
    string s;
    while(getline(cin,s)) {
		string t;
		rep(j,0,26) {
			t.clear();
			rep(i,0,s.length()) {
				if('a' <= s[i] && s[i] <= 'z') t += (s[i] + j > 'z') ? (s[i] + j - 26) : (s[i] + j);
				else t += s[i];
			}
			if(t.find("this") != string::npos) break;
			else if(t.find("the") != string::npos) break;
			else if(t.find("that") != string::npos) break;
		}
		cout << t << endl;
	}
    return 0;
}

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

char shift(char in){
	if('a'<=in&&in<='y'){
		return in+1;
	}else if(in=='z'){
		return 'a';
	}else{
		return in;
	}	
}
int main(){
	char a[100];
	string data;
	while(cin.getline(a,100)){
	cout<<a<<endl;
		while(true){
			data=a;
			if(data.find("the")!=-1 || data.find("this")!=-1 || data.find("that")!=-1)
				break;
			for(int i=0;a[i]!='\0';i++){
				a[i]=shift(a[i]);
			}
//		cout<<a<<endl;
		}
		cout<<data<<endl;
	}
}

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

bool validate(const std::string& str) {
	if (str.find("the") != std::string::npos
		|| str.find("this") != std::string::npos
		|| str.find("that") != std::string::npos) {
		return true;		
	}
	return false;
}

int main() {
	std::string str;
	std::getline(std::cin, str);
	
	std::string ans;
	const int limit = 'z' - 'a' + 1;
	for (int i = 0; i < limit; ++i) {
		for (auto c : str) {
			int elem = c + i;
			if (c >= 'a' && c <= 'z') {
				if (elem > 'z') {
					elem = 'a' + elem - 'z' - 1;
				}
				ans.push_back(elem);
			} else {
				ans.push_back(c);
			}
		}
		if (validate(ans)) {
			break;
		}
		ans.clear();
	}
	
	std::cout << ans << std::endl;
}

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

using namespace std;
string buf;
bool found(){
    return buf.find("this",0) != string::npos ||
        buf.find("that",0) != string::npos ||
        buf.find("the",0) != string::npos;
}

bool isalpha(char c){
    return 'a' <= c && c <= 'z';
}

int main(){
    getline(cin, buf);
    cout << buf << endl;
    while(!found()){
        for(int i=0; i<buf.size(); i++){
            if(isalpha(buf[i])) buf[i]++;
        }
        cout << buf << endl;
    }
    cout << buf << endl;
}