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>
#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;
      }
    }
  }
}

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

using namespace std;

int the[2],that[3],_this[3];

bool checkThe(char s[]){
  if(strlen(s)!=3){
    return false;
  }else{
    if(s[0]-s[1]==the[0] && s[1]-s[2]==the[1]){
      return true;
    }
  }
  return false;
}
bool checkThis(char s[]){
  if(strlen(s)!=4){
    return false;
  }else{
    if(s[0]-s[1]==_this[0] && s[1]-s[2]==_this[1] && s[2]-s[3]==_this[2]){
      return true;
    }
  }
  return false;
}
bool checkThat(char s[]){
  if(strlen(s)!=4){
    return false;
  }else{
    if(s[0]-s[1]==that[0] && s[1]-s[2]==that[1] && s[2]-s[3]==that[2]){
      return true;
    }
  }
  return false;

}
int main(){
  int key=0;
  char str[100];
  char temp[100];
 

  the[0]='t'-'h';
  the[1]='h'-'e';

  that[0]='t'-'h';
  that[1]='h'-'a';
  that[2]='a'-'t';

  _this[0]='t'-'h';
  _this[1]='h'-'i';
  _this[2]='i'-'s';
    
  char *tok;
  bool f=false;
  while(fgets(str,sizeof(str),stdin)!=NULL){
  
    for(int i=0;i<strlen(str);i++)
      temp[i]=str[i];
    temp[strlen(str)]='\0';

    str[strlen(str)]='\0';
    str[strlen(str)-1]='\0';
    tok=strtok(str," ");
 
    if(strlen(tok)==3){
      if(checkThe(tok)==true){
	key=tok[0]-'t';
	f=true;
      }
    }else if(strlen(tok)==4){
      if(checkThat(tok)==true){
	key=tok[0]-'t';
	f=true;
      }else if(checkThis(tok)==true){
	key=tok[0]-'t';
	f=true;
      }
    }
    while(f==false && tok!=NULL){
      tok=strtok(NULL," ");
      if(tok!=NULL){
	if(strlen(tok)==3){
	  if(checkThe(tok)==true){
	    key=tok[0]-'t';
	    f=true;
	  }
	}else if(strlen(tok)==4){
	  if(checkThat(tok)==true){
	    key=tok[0]-'t';
	    f=true;
	  }else if(checkThis(tok)==true){
	    key=tok[0]-'t';
	    f=true;
	  }
	}
      }
    }
   
    for(int i=0;i<strlen(temp);i++){
      if('a'<=str[i] && str[i]<='z'){
	printf("%c",temp[i]-key);
      }else{
	printf("%c",temp[i]);
      }
    }

  }

  return 0;
}

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

int main() {
  string s;
  getline(cin, s);

  bool b = false;
  for(int i = 1; i < 26; i++) {
    string change;
    for(int j = 0; j < s.size(); j++) {
      if('a' <= s[j] && s[j] <= 'z') change += (s[j]+i)%26 + 'a';
      else change += s[j];
    }

    for(int j = 0; j < change.size(); j++) {
      string tmp = change.substr(j,4);
      if(tmp == "this" || tmp == "that") b = true;
      if(tmp.substr(0,3) == "the") {
	if('a' > tmp[3] || tmp[3] > 'z') {
	  b = true;
	}
      }
    }
    if(b) {
      cout << change << endl;
      break;
    }
  }
}

C++: #include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>

const int MAX_INPUT = 1000000;
const int ARRAY_SIZE = 20;
const int MAX_LEN = 8;
char inputA[MAX_INPUT];
char inputB[MAX_INPUT];

void toBigInt(char *str, long *r) {
    int len = strlen(str);
    int endIndex = ARRAY_SIZE - (len / MAX_LEN) - 1;

    {
        int offset = 0;
        for (int i = 0; i < ARRAY_SIZE; ++i) {
            char temp[MAX_LEN + 1] = { 0 };
            int readLen = ((len - offset) < MAX_LEN) ? len - offset : MAX_LEN;
            char* start = str + len - offset - readLen;

            strncpy(temp, start, readLen);
            r[ARRAY_SIZE - i- 1] = (long)atoi(temp);
            offset += readLen;
        }
    }
}

int main() {
    const char OVER[] = "overflow\n";
    int n = 0;
    scanf("%d", &n);

    for (int i = 0; i < n; ++i) {
        scanf("%s\n%s", &inputA, &inputB);
        long a[ARRAY_SIZE] = { 0 };
        long b[ARRAY_SIZE] = { 0 };
        long r[12] = { 0 };
        int lenA = 0;
        int lenB = 0;
        const int MAX_INPUT_LEN = 80;
        lenA = strlen(&inputA[0]);
        lenB = strlen(&inputB[0]);
        if ((MAX_INPUT_LEN < lenA) || (MAX_INPUT_LEN < lenB)) {
            printf(OVER);
            continue;
        }

        toBigInt(inputA, a);
        toBigInt(inputB, b);
        for (int i = 0; i < ARRAY_SIZE; ++i) {
            int curRIndex = 12 - i - 1;
            r[curRIndex] += a[ARRAY_SIZE - i - 1] + b[ARRAY_SIZE - i - 1];
            const int MAX = 99999999;
            if (MAX < r[curRIndex]) {
                r[curRIndex - 1] = r[curRIndex] / (MAX + 1);
                r[curRIndex] %= (MAX + 1);
            }
        }

        if ((9999999 < r[2]) || (0 < r[1])) {
            printf(OVER);
            continue;
        }

        {
            bool started = false;
            bool noOutput = true;
            for (int i = 0; i < 12; ++i) {
                if (!started && (0 < r[i])) {
                    started = true;
                    printf("%d", r[i]);
                    noOutput = false;
                    continue;
                }

                if (started) {
                    long temp = (r[i] == 0) ? 1 : r[i];
                    for (int j = 0; temp * pow(10, j) < 1000000; ++j) {
                        printf("0");
                    }

                    printf("0");
                    printf("%d", r[i]);
                }
            }

            if (noOutput) {
                printf("0");
            }
        }
        printf("\n");
        for (int i = 0; i < MAX_INPUT; ++i) {
            inputA[i] = 0;
            inputB[i] = 0;
        }
    }
    return 0;
}