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 <iostream>
#include <string.h>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
	string w[3]={"the","this","that"},st;
	int wn[3]={3,4,4},k,i,j,s,f;
	while(true) {
    k=0; 
	getline(cin,st);
	while(k<st.size()) {
		for (i=0;i<3;i++) {
			s=0; f=0;
			if (st.size()<k+wn[i]) break;
			for (j=0;j<wn[i]-1;j++) if ((w[i][j]-w[i][j+1])==(st[k+j]-st[k+j+1])) s++;
			if (s==wn[i]-1)  { f=1; i=5;}
		}
		if (f==1) break;
		for (k;st[k]>='a' && st[k]<='z';k++);
		k++;
	}
	if (f==0) cout << st; else {
		for (i=0;i<st.size();i++) 
			if ((st[i]>='a' && st[i]<='z')) cout << (char)(((st[i]-st[k]+'t')-97+26) % 26 + 97) ; 
		    else cout << st[i];
	}
	cout << endl;
	}
	return 0;
	}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	string str;
	for(;getline(cin,str);){
		/*int len=str.size();
		int i,c;
		for(c=1;c<=26;c++){
			for(i=0;i<len;i++){
				if('a'<=str[i]&&str[i]<='z'){
					str[i]++;
					if(str[i]>'z')str[i]='a';
				}
			}
			//cout<<str<<endl;
			if(str.find("the")!=string::npos||str.find("this")!=string::npos||str.find("that")!=string::npos){
				cout<<str<<endl;
				break;
			}
		}*/
	}
	return 0;
}

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

using namespace std;

void solve()
{
	string s;
	while(getline(cin, s))
	{
		for(int i = 0; i < 26; ++i)
		{
			for(int j = 0; j < s.size(); ++j)
			{
				if(s[j] >= 'a' && s[j] <= 'z')
				{
					++s[j];
					if(s[j] > 'z')
					{
						s[j] -= 26;
					}
				}
			}
			unsigned int pos1 = s.find("this");
			unsigned int pos2 = s.find("the");
			unsigned int pos3 = s.find("that");
			if(!(pos1 == string::npos && pos2 == string::npos && pos3 == string::npos))
			{
				cout << s << endl;
				break;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

int main() {
	string cipher;
	getline(cin, cipher);
	
	for (int i = 0; i < 26;i++) {
		for (int n = 0;n < cipher.length();n++) {
			if (cipher.at(n) == 'z') {
				cipher.at(n) = 'a';
			}else if(cipher.at(n)>='a'&&cipher.at(n)<='y'){
				cipher.at(n)++;
			}
		}

		if (cipher.find("the") != string::npos || 
			cipher.find("this") != string::npos ||
			cipher.find("that") != string::npos) {
			cout << cipher << endl;
		}
	}
	
	
	return 0;
}

C++: #include<iostream>

int isThisOrThatOrThe(std::string s){
  int dif=0;
  char cro = s[0];
  while(true){
    if(cro == 't')break;
    cro+=1;
    if(cro > 'z')cro = 'a';
    dif++;
  }
  std::string cpys;
  for(int i=0;i<s.length();i++){
    if(s[i]+dif > (int)'z')cpys += (char)((s[i]+dif)%123+'a'); 
    else cpys += (char)(s[i] + dif);
  }
  if(cpys == "that" || cpys == "this" || cpys == "the")return dif;
  return -1;
}


int main(){
  std::string s;
  getline(std::cin,s,'\n');
  bool piri = false;
  int st=0,dif = -12;
  for(int i=0;i<=s.length();i++){
    if(s[i] == ' ' || i == s.length() || s[i] == '.'){
      dif = isThisOrThatOrThe(s.substr(st,i-st));
      if(dif != -1){
	break;
      }
      st = i+1;
    }
  }

  for(int i=0;i<s.length();i++){
    if(s[i] == ' ' || s[i] == '.'){
      std::cout << s[i];
      continue; 
    }
    s[i]+dif > (int)'z'?std::cout << (char)((s[i]+dif)%123+'a'):std::cout << (char)(s[i]+dif);
  }
  std::cout << std::endl;
  return 0;
}

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

int main() {
	ios :: sync_with_stdio(false);
	string s;
	while(getline(cin, s)) {
		for(int t = 0; t < 26; t ++) {
			for(auto &c : s) if(isalpha(c)){
				c = (c - 'a' + 1) % 26 + 'a';
			}
			if(s.find("the") != -1 ||
				s.find("this") != -1 ||
				s.find("that") != -1) {
				cout << s << '\n';
				break;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a[5],tmp;
  for(int i=0;i<5;i++){
    cin >> a[i];
  }
  for(int i=0;i<5;i++){
    for(int j=0;j<4;j++){
      if(a[j] < a[j+1]){
	tmp = a[j];a[j] = a[j+1]; a[j+1] = tmp;
      }
    }
  }
    for(int i=0;i<4;i++){
      cout << a[i] << " ";
    }
    cout << a[4] << endl;
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>
#include <vector>

using namespace std;


int main(){

	vector<string> str, ans;
	string temp;
	int slide;

	while(cin >> temp){
		str.push_back(temp);
	}

	for(int i=0 ; i<str.size() ; i++){
		ans.push_back(str[i]);
	}

	for(int i=0 ; i<25 ; i++){

		for(int j=0 ; j<str.size()-1 ; j++){
			for(int k=0 ; k<str[j].size() ; k++){
				str[j][k]++;
				if(str[j][k] > 'z'){
					str[j][k] = str[j][k] - 'z' + 'a' -1;
				}
			}
		}

		for(int k=0 ; k<str[str.size()-1].size()-1 ; k++){
			str[str.size()-1][k]++;
			if(str[str.size()-1][k] > 'z'){
				str[str.size()-1][k] = str[str.size()-1][k] - 'z' + 'a' -1;
			}
		}
		for(int k=0 ; k<str.size() ; k++){
			if(str[k] == "the" || str[k] == "that" || str[k] == "this"
					|| str[k] == "the." || str[k] == "that." || str[k] == "this."){
				slide = i+1;
				break;
			}
		}
	}

	for(int i=0 ; i<ans.size()-1 ; i++){
		for(int k=0 ; k<ans[i].size() ; k++){
			if((ans[i][k] + slide) > 'z'){
				ans[i][k] = ans[i][k] - 'z' + 'a' -1 + slide;
			}
		}
		cout << ans[i] << ' ';
	}

	for(int i=0 ; i<ans[ans.size()-1].size() ; i++){
		if((ans[ans.size()-1][i] + slide) > 'z'){
			ans[ans.size()-1][i] = ans[ans.size()-1][i] - 'z' + 'a' -1 +slide;
		}
	}
	cout << ans[ans.size()-1] << endl;

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c - 'a' + 25) % 26 + 'a';
    }
}

int main()
{
    string s;

    while (getline(cin, s)) {
        if (s == "") break;
        while (s.find("the") != string::npos || s.find("this") != string::npos || s.find("that") != string::npos) f(s);
        cout << s << endl;
    }
}