Go: package main

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

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 reflect.DeepEqual(infos, []string{}) {
			break
		}
		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, " "))
	}
}

Python: basea = ord("a")
basez = ord("z")

def slide(c):
  ordc = ord(c)  
  diff = ordc - basea
  diff += 1
  diff %= 26
  return chr(basea + diff)

while True:
  try:
    s = input()
    while True:
      if "the" in s or "this" in s or "that" in s:
        print(s)
        break
      s = "".join([slide(c) if basea <= ord(c) <= basez else c for c in s])
  except EOFError:
    break

Python: # -*- coding: utf-8 -*-

import sys
import os
from math import sin, cos
import math

alphabet = 'abcdefghijklmnopqrstuvwxyz'


def rotate_char(c, num):
    if c == ' ' or c == '.' or c == '\n':
        return c

    n = ord(c) + num
    if n > 122:
        n -= 26
    return chr(n)

def rotate_string(s, num):
    ret = []
    for c in s:
        new_c = rotate_char(c, num)
        ret.append(new_c)
    return ''.join(ret)

for s in sys.stdin:
    for i in range(26):
        rotated = rotate_string(s, i)
        if 'the' in rotated or 'this' in rotated or 'that' in rotated:
            print(rotated, end='')
            break

Python: d= dict(zip([chr(i) for i in range(97, 123)], [chr(i) for i in range(119,123)]+[chr(i) for i in range(97, 119)]))
while 1:
    try:
        text= input()
        for i in input():
            t= d.get(i)
            print(i if t== None else t, end='')
        print()
    except:
        break

Python: s=input()

for _ in range(26):
    if " this " in s or " that " in s or " the " in s:
        print(s)
        break

    s=list(s)
    for i in range(len(s)):
        if ord(s[i]) <= ord("z") and ord(s[i]) >= ord("a"):
            if s[i] != "a":
                s[i] = chr(ord(s[i])-1)
            else:
                s[i] = "z"
    s="".join(s)

Python: import sys


def _rot(c, i):
    if ord("a") < ord(c) and ord(c) < ord("z"):
        return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
    if ord("A") < ord(c) and ord(c) < ord("Z"):
        return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
    return c


def rot(str, i):
    g = [_rot(c, i) for c in str]
    return "".join(g)


def caesar(str):
    for i in range(26):
        test = rot(str, i).split()
        if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
            return " ".join(test)
    return "nan"


a = []
for line in sys.stdin:
    a.append(line)
for i in range(len(a)):
    print(caesar(a[i]))

Python: s = input()
a = "".join([chr(97 + i) for i in range(26)])
b = "".join([a[i -1] for i in range(26)])
x = str.maketrans(a, b)
while True:
    s.translate(x)
    if "the" in s or "that" in s or "this" in s:
        print(s)
        break

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define drep(n,m) for(int i=0;i<n;i++)for(int j=0;j<m;j++)
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

ll gcd(ll a,ll b){
    if(a<b){
        int t=a;a=b;b=t;
    }
    int c=a%b;
    while(c!=0){
        a=b;
        b=c;
        c=a%b;
    }
    return b;
}

ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

bool isPrime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return false;
    }
    return true;
}

int main() {
   string s;
   while(getline(cin,s)){
       rep(i,1,27){
           string ss=s;
           rep(j,0,s.length()){
               if(ss[j]!=' ') ss[j]+=i;
               if(ss[j]>'z')ss[j]-='z'-'a'+1;
               
           }
           cout<<ss<<endl;
           rep(k,0,s.length()){
                   if(ss.substr(k,3)=="the"||ss.substr(k,4)=="this"||ss.substr(k,4)=="that"){
                       cout<<ss<<endl;
                       goto AWAY;   
                   }
               }
       }
       AWAY:;
   }
    
    return 0;
}

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

using namespace std;

int main() {
    string a;
    
    getline(cin,a);
    
    while (1){
        if(a.find("this")!=-1 || a.find("this")!=-1 || a.find("this")!=-1){
            break;
        }
        
        for(int i=0; i<a.length(); i++){
            if(a[i]==' '|| a[i]=='.'){
                
            }else if(a[i]=='z'){
                a[i]='a';
            }else{
                a[i]++;
            }
        }

    }
    cout<<a;
    
    
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>


int main()
{
	char s[81];
	while (fgets(s, 81, stdin) != NULL)
	{
		for (int i = 0; i < 26; ++i)
		{
			char decoded[81];
			for (int j = 0; s[j] != '\0'; ++j)
				decoded[j] = islower(s[j]) ? 'a'+(s[j]-'a'+i)%26 : s[j];
			decoded[strlen(s)-1] = '\0';
			if (strstr(decoded, "the")
				|| strstr(decoded, "this")
				|| strstr(decoded, "that"))
			{
				puts(decoded);
				break;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cstring>
using namespace std;
int main(){
  char a[81];
  cin.getline(a,81);
  while(1){
    for(int i=0;i<strlen(a);i++){
      if(a[i]>='a'&&a[i]<='z'){
      if(a[i]=='z') a[i] = 'a';
      else a[i] = a[i]-'a'+'b';
      }
    }
    for(int i=0;i<strlen(a)-3;i++){
      if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='i'&&a[i+3]=='s') goto END;
      if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='a'&&a[i+3]=='t') goto END;
      if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='e') goto END;
    }
  }
 END:
  for(int i=0;i<strlen(a);i++) cout << a[i];
  cout << endl;
  return 0;
}

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

using namespace std;

bool is_finish(string s)
{
    string str;
    stringstream ss(s);
    while (ss >> str) {
        if (str == "the" ||
            str == "this" ||
            str == "that") return 1;
    }
    return 0;
}

int main()
{
    string s;
    getline(cin, s);
    s.pop_back();
    for (int i = 0; i < 26; i++) {
        for (char &c: s) {
            if (islower(c)) {
                c = c + 1;
                if (c > 'z') c = 'a';
            }
        }
        if (is_finish(s)) {
            break;
        }
    }
    cout << s << "." << endl;
    return 0;
}